/**
 * VIVA Quote Page Styles
 * Styling for quote checkout page with 2-step process
 */

.quote-page {
    background-color: #fff;
    padding: 60px 20px;
    min-height: 100vh;
}

.quote-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Progress Bar */
.quote-progress {
    max-width: 800px;
    margin: 0 auto 60px;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    position: relative;
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    position: relative;
    z-index: 2;
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.step-indicator.active .step-number {
    background: #c63fe8;
    color: #fff;
    box-shadow: 0 4px 12px rgba(198, 63, 232, 0.3);
}

.step-indicator.completed .step-number {
    background: #10b981;
    color: #fff;
}

.step-indicator.completed .step-number::after {
    content: '✓';
    position: absolute;
    font-size: 1.4rem;
}

.step-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #9ca3af;
    transition: color 0.3s ease;
}

.step-indicator.active .step-label,
.step-indicator.completed .step-label {
    color: #1d1d1d;
}

.progress-bar {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #c63fe8, #a32ec0);
    transition: width 0.4s ease;
    border-radius: 2px;
}

/* Header */
.section-header {
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 1.8rem;
    color: #1d1d1d;
    margin-bottom: 10px;
}

.section-desc {
    font-size: 1rem;
    color: #7f7f7f;
    margin: 0;
}

/* Cart Section */
.quote-cart-section {
    background: #f9f9f9;
    padding: 40px;
    border-radius: 12px;
    margin-bottom: 40px;
}

/* Cart Items */
.cart-items-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.cart-item {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    display: grid;
    grid-template-columns: 100px 1fr auto 40px;
    gap: 20px;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.cart-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.item-image {
    width: 100px;
    height: 100px;
    overflow: hidden;
    border-radius: 8px;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-details h3 {
    font-size: 1.2rem;
    margin: 0 0 8px 0;
    color: #1d1d1d;
}

.item-size {
    color: #7f7f7f;
    font-size: 0.95rem;
    margin: 0 0 12px 0;
}

.item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.item-quantity label {
    font-size: 0.9rem;
    color: #7f7f7f;
}

.qty-input {
    width: 70px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    text-align: center;
}

.item-pricing {
    text-align: right;
}

.item-price {
    font-size: 0.9rem;
    color: #7f7f7f;
    margin: 0 0 8px 0;
}

.item-subtotal {
    font-size: 1.3rem;
    font-weight: 700;
    color: #c63fe8;
    margin: 0;
}

.btn-remove {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #999;
    transition: color 0.3s ease;
}

.btn-remove:hover {
    color: #e74c3c;
}

.btn-remove svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}

/* Cart Summary */
.cart-summary {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border-top: 3px solid #c63fe8;
    margin-bottom: 30px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.summary-label {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1d1d1d;
}

.summary-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #c63fe8;
}

.summary-note {
    font-size: 0.85rem;
    color: #999;
    margin: 0;
    font-style: italic;
}

/* Cart Actions */
.cart-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    width: 80px;
    height: 80px;
    stroke: #ddd;
    stroke-width: 1.5;
    margin: 0 auto 20px;
    display: block;
}

.empty-cart h3 {
    font-size: 1.5rem;
    color: #1d1d1d;
    margin-bottom: 10px;
}

.empty-cart p {
    color: #7f7f7f;
    margin-bottom: 30px;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-browse {
    display: inline-block;
    padding: 14px 40px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 30px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: #c63fe8;
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    background: #a32ec0;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(198, 63, 232, 0.4);
}

.btn-secondary {
    background: #f3f4f6;
    color: #1d1d1d;
}

.btn-secondary:hover {
    background: #e5e7eb;
    transform: translateY(-2px);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-browse {
    background: #c63fe8;
    color: #fff;
}

.btn-browse:hover {
    background: #a32ec0;
    transform: translateY(-2px);
}

/* Form Section */
.quote-form-section {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.form-fields-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 30px;
}

.form-field {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.form-field label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #1d1d1d;
    font-size: 0.95rem;
}

.form-field .required {
    color: #e74c3c;
    margin-left: 4px;
}

.form-field input,
.form-field select,
.form-field textarea {
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
    background: #fff;
    box-sizing: border-box;
}

.form-field select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
    cursor: pointer;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: #c63fe8;
}

.form-field textarea {
    resize: vertical;
    min-height: 120px;
}

/* Full width fields */
.form-field:has(textarea) {
    grid-column: 1 / -1;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* Button Loader */
.btn-loader {
    animation: rotate 2s linear infinite;
}

.btn-loader svg {
    width: 20px;
    height: 20px;
}

.btn-loader circle {
    stroke: currentColor;
    stroke-width: 3;
    stroke-dasharray: 50;
    stroke-dashoffset: 0;
    animation: dash 1.5s ease-in-out infinite;
    fill: none;
}

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

@keyframes dash {
    0% { stroke-dashoffset: 0; }
    50% { stroke-dashoffset: 25; }
    100% { stroke-dashoffset: 50; }
}

/* Success/Error Messages */
.quote-message {
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    margin-bottom: 40px;
}

.success-message {
    background: #f0fdf4;
    border: 2px solid #22c55e;
}

.error-message {
    background: #fef2f2;
    border: 2px solid #ef4444;
}

.message-icon {
    width: 80px;
    height: 80px;
    stroke-width: 2;
    margin: 0 auto 20px;
    display: block;
}

.success-message .message-icon {
    stroke: #22c55e;
}

.error-message .message-icon {
    stroke: #ef4444;
}

.quote-message h2 {
    font-size: 2rem;
    color: #1d1d1d;
    margin-bottom: 15px;
}

.quote-message p {
    font-size: 1.1rem;
    color: #4b5563;
    margin-bottom: 10px;
}

.error-message p {
    color: #dc2626;
    font-weight: 600;
}

.quote-number {
    font-size: 1.2rem;
    margin: 20px 0;
}

.quote-number strong {
    color: #c63fe8;
}

/* Responsive */
@media (max-width: 768px) {
    .quote-progress {
        margin-bottom: 40px;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .step-label {
        font-size: 0.8rem;
    }

    .cart-item {
        grid-template-columns: 80px 1fr;
        gap: 15px;
    }

    .item-image {
        width: 80px;
        height: 80px;
    }

    .item-pricing {
        grid-column: 2;
        text-align: left;
    }

    .btn-remove {
        grid-column: 2;
        justify-self: end;
    }

    .form-fields-container {
        grid-template-columns: 1fr;
    }

    .quote-cart-section,
    .quote-form-section {
        padding: 25px;
    }

    .cart-actions,
    .form-actions {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary,
    .btn-browse {
        width: 100%;
    }
}