/* View Transitions CSS for 3D Print Pricing Calculator */

/* View Container Styles */
.view-container {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.view-container.active {
    display: block;
    opacity: 1;
}

/* Buy Now View Styles */
#buyNowView {
    background-color: #f9fafb;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

#buyNowView .view-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 15px;
}

#buyNowView .view-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: #234F71;
    margin: 0;
    flex-grow: 1;
}

#buyNowView .back-button {
    display: flex;
    align-items: center;
    background: transparent;
    border: none;
    color: #0D95B3;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

#buyNowView .back-button:hover {
    background-color: rgba(13, 149, 179, 0.1);
}

#buyNowView .back-button svg {
    margin-right: 8px;
}

/* Card Styles */
.model-details-card,
.selected-options-card,
.price-summary-card {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #234F71;
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
}

/* Model Info Styles */
.model-info-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.model-info-item {
    display: flex;
    flex-direction: column;
    margin-bottom: 8px;
}

.info-label {
    font-size: 14px;
    color: #6B7280;
    margin-bottom: 4px;
}

.info-value {
    font-size: 16px;
    font-weight: 500;
    color: #252F3F;
}

/* Price Summary Styles */
.price-summary-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.price-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #e5e7eb;
}

.price-label {
    font-size: 16px;
    color: #6B7280;
}

.price-value {
    font-size: 16px;
    font-weight: 500;
    color: #252F3F;
}

.price-container {
    background-color: #f3f4f6;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-label {
    font-size: 18px;
    font-weight: 600;
    color: #252F3F;
}

.total-value {
    font-size: 24px;
    font-weight: 700;
    color: #0E9F6E;
}

/* Form Styles */
#checkoutForm {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 25px;
    margin-top: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

.email-form-container h4 {
    font-size: 18px;
    font-weight: 600;
    color: #234F71;
    margin-bottom: 20px;
}

.form-control {
    border: 1px solid #d2d6dc;
    border-radius: 6px;
    padding: 12px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.form-control:focus {
    border-color: #0D95B3;
    box-shadow: 0 0 0 3px rgba(13, 149, 179, 0.2);
    outline: none;
}

.submit-button-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
}

/* Button Styles */
.btn {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-blue-gradient {
    background: linear-gradient(90deg, #234F71 0%, #192B4C 100%);
    color: white;
    border: none;
}

.btn-blue-gradient:hover {
    background: linear-gradient(90deg, #1d4262 0%, #14233f 100%);
    transform: translateY(-1px);
}

.btn-blue-outline {
    background: transparent;
    color: #234F71;
    border: 1px solid #234F71;
}

.btn-blue-outline:hover {
    background-color: rgba(35, 79, 113, 0.1);
}

/* Order Confirmation View Styles */
#orderConfirmationView {
    text-align: center;
    background-color: #f9fafb;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

#orderConfirmationView .confirmation-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
}

#orderConfirmationView h2 {
    font-size: 28px;
    font-weight: 700;
    color: #0E9F6E;
    margin-bottom: 15px;
}

#orderConfirmationView p {
    font-size: 16px;
    color: #6B7280;
    margin-bottom: 30px;
}

#orderConfirmationView .order-code {
    font-size: 20px;
    font-weight: 600;
    color: #234F71;
    background-color: #e5e7eb;
    padding: 10px 20px;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 30px;
}

/* Responsive Styles */
@media (max-width: 991px) {
    .purchase-container {
        flex-direction: column;
    }
    
    .model-info-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 767px) {
    #buyNowView {
        padding: 20px 15px;
    }
    
    .model-details-card,
    .selected-options-card,
    .price-summary-card,
    #checkoutForm {
        padding: 15px;
    }
    
    .card-title {
        font-size: 16px;
    }
    
    .info-value,
    .price-value {
        font-size: 14px;
    }
    
    .total-value {
        font-size: 20px;
    }
    
    .submit-button-container {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

/* Loading Spinner */
.spinner-container {
    display: inline-block;
    position: relative;
    width: 24px;
    height: 24px;
    margin-right: 10px;
}

.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 3px solid #ffffff;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Selected Options Display */
#view-purchase-history {
    padding: 0;
}

#view-purchase-history table {
    width: 100%;
    border-collapse: collapse;
}

#view-purchase-history td {
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}

#view-purchase-history td:first-child {
    font-weight: 500;
    color: #252F3F;
}

#view-purchase-history td:last-child {
    text-align: right;
    color: #6B7280;
}
