/**
 * Riparazione Via Posta Page Styles
 * Professional design for mail-in repair booking
 */

/* Hero Section - Fixed padding for navbar */
.riparazione-hero {
    background: linear-gradient(135deg, #E6002B 0%, #b30022 100%);
    color: white;
    padding: 140px 20px 100px; /* Extra padding-top to avoid navbar overlap */
    text-align: center;
    position: relative;
    overflow: hidden;
}

.riparazione-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.15) 0%, transparent 60%),
                radial-gradient(circle at 70% 80%, rgba(255,255,255,0.15) 0%, transparent 60%);
    opacity: 0.6;
}

.riparazione-hero h1 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.riparazione-hero p {
    font-size: 1.3rem;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.98;
    position: relative;
    z-index: 1;
    line-height: 1.7;
    color: white;
}

/* Info Section */
.info-section {
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
    padding: 80px 20px;
}

.info-intro {
    text-align: center;
    max-width: 850px;
    margin: 0 auto 50px;
}

.info-intro h2 {
    font-size: 2.4rem;
    color: #1a1a1a;
    margin-bottom: 1.2rem;
    font-weight: 700;
}

.info-intro p {
    font-size: 1.15rem;
    color: #555;
    line-height: 1.8;
}

/* Accordion Styles - Improved Design */
.info-accordion {
    max-width: 950px;
    margin: 0 auto;
}

.accordion-item {
    background: white;
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e8e8e8;
}

.accordion-item:hover {
    box-shadow: 0 4px 16px rgba(230, 0, 43, 0.12);
    border-color: #E6002B;
}

.accordion-item.active {
    border-color: #E6002B;
    box-shadow: 0 4px 20px rgba(230, 0, 43, 0.15);
}

.accordion-header {
    width: 100%;
    background: white;
    border: none;
    padding: 24px 28px;
    display: flex;
    align-items: center;
    gap: 18px;
    cursor: pointer;
    text-align: left;
    font-size: 1.15rem;
    font-weight: 600;
    color: #1a1a1a;
    transition: background 0.2s ease;
}

.accordion-header:hover {
    background: #fafafa;
}

.accordion-item.active .accordion-header {
    background: #fff5f7;
}

.accordion-icon-svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: #E6002B;
}

.accordion-arrow-svg {
    margin-left: auto;
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
    color: #E6002B;
}

.accordion-item.active .accordion-arrow-svg {
    transform: rotate(90deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.accordion-item.active .accordion-content {
    max-height: 1500px;
}

.accordion-content > div {
    padding: 8px 32px 32px;
}

.accordion-content p {
    margin-bottom: 14px;
    line-height: 1.7;
    color: #444;
    font-size: 1rem;
}

.accordion-content ul,
.accordion-content ol {
    margin: 14px 0 14px 24px;
    line-height: 1.9;
}

.accordion-content li {
    margin-bottom: 10px;
    color: #444;
}

.accordion-content strong {
    color: #1a1a1a;
    font-weight: 600;
}

.accordion-content .warning {
    background: #fff9e6;
    border-left: 4px solid #ff9800;
    padding: 16px 20px;
    margin: 20px 0;
    border-radius: 6px;
}

.accordion-content hr {
    border: 0;
    border-top: 1px solid #e0e0e0;
    margin: 20px 0;
}

/* CTA Container */
.cta-container {
    text-align: center;
    margin-top: 50px;
}

.cta-container .btn {
    padding: 18px 48px;
    font-size: 1.15rem;
    box-shadow: 0 4px 16px rgba(230, 0, 43, 0.25);
    transition: all 0.3s ease;
}

.cta-container .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 0, 43, 0.35);
}

/* Booking Container - Add top margin */
.booking-container {
    padding-top: 60px;
}

/* Shipping Form */
.shipping-form {
    margin-bottom: 30px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #E6002B;
    box-shadow: 0 0 0 3px rgba(230, 0, 43, 0.1);
}

.form-group small {
    display: block;
    margin-top: 8px;
    color: #777;
    font-size: 0.875rem;
}

.required {
    color: #E6002B;
}

/* Courier Section */
.courier-section {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid #e8e8e8;
}

/* Info boxes styles */
.booking-info-success {
    background: #d4edda;
    border-left: 4px solid #28a745;
}

/* Warranty radio options */
.warranty-radio-option {
    flex: 1;
    padding: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.warranty-radio-option:has(input:checked) {
    border-color: #E6002B !important;
    background-color: #fff5f7 !important;
}

.warranty-radio-option:hover {
    border-color: #E6002B !important;
}

.section-subtitle {
    font-size: 1.4rem;
    color: #1a1a1a;
    margin-bottom: 12px;
    font-weight: 700;
}

.courier-info {
    margin-bottom: 24px;
    font-size: 0.95rem;
    color: #666;
}

.courier-loading {
    text-align: center;
    padding: 50px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #E6002B;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.courier-error {
    text-align: center;
    padding: 30px;
    background: #fff5f5;
    border-radius: 8px;
}

.error-text {
    color: #dc3545;
    font-weight: 600;
    font-size: 1rem;
}

.success-text {
    color: #28a745;
    font-weight: 600;
    font-size: 1rem;
}

/* Courier Options Grid */
.courier-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.courier-card {
    background: white;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.courier-card:hover {
    border-color: #E6002B;
    box-shadow: 0 6px 20px rgba(230, 0, 43, 0.15);
    transform: translateY(-2px);
}

.courier-card.selected {
    border-color: #E6002B;
    background: linear-gradient(to bottom, #fff5f7 0%, white 100%);
    box-shadow: 0 8px 24px rgba(230, 0, 43, 0.25);
    transform: translateY(-2px);
}

.courier-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.courier-header h4 {
    font-size: 1.3rem;
    color: #1a1a1a;
    margin: 0;
    font-weight: 700;
}

.courier-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: #E6002B;
}

.courier-price.free-price {
    color: #28a745;
}

.courier-service {
    color: #666;
    font-size: 0.95rem;
    margin: 10px 0;
    line-height: 1.5;
}

.courier-delivery {
    color: #999;
    font-size: 0.875rem;
    margin-bottom: 18px;
}

.select-courier-btn {
    width: 100%;
    padding: 12px;
    font-size: 0.95rem;
}

.courier-card.selected .select-courier-btn {
    background: #E6002B;
    color: white;
    border-color: #E6002B;
}

/* Summary Sections */
.summary-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 20px;
    border-left: 4px solid #E6002B;
}

.summary-section h3 {
    font-size: 1.2rem;
    color: #1a1a1a;
    margin-bottom: 16px;
    font-weight: 700;
}

.summary-section p {
    margin: 8px 0;
    color: #555;
    line-height: 1.6;
}

.summary-section ul {
    margin: 12px 0;
    padding-left: 24px;
}

.summary-section li {
    margin: 8px 0;
    color: #555;
}

/* Success Step */
.success-message {
    text-align: center;
    padding: 60px 20px;
}

.success-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #28a745 0%, #20863a 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    margin: 0 auto 30px;
    box-shadow: 0 4px 20px rgba(40, 167, 69, 0.3);
}

.success-message h2 {
    color: #28a745;
    margin-bottom: 20px;
    font-size: 2rem;
}

.success-details {
    max-width: 650px;
    margin: 0 auto;
    text-align: left;
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
}

.success-details p {
    margin: 14px 0;
    font-size: 1rem;
}

.success-details hr {
    margin: 28px 0;
    border: 0;
    border-top: 1px solid #ddd;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 8px;
    border: 2px solid transparent;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #E6002B;
    color: white;
    border-color: #E6002B;
}

.btn-primary:hover {
    background: #c40024;
    border-color: #c40024;
}

.btn-secondary {
    background: white;
    color: #E6002B;
    border-color: #E6002B;
}

.btn-secondary:hover {
    background: #fff5f7;
}

.btn-outline {
    background: transparent;
    color: #E6002B;
    border-color: #E6002B;
}

.btn-outline:hover {
    background: #E6002B;
    color: white;
}

.btn-lg {
    padding: 18px 40px;
    font-size: 1.15rem;
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.9rem;
}

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

/* Checkbox Labels */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
}

/* Symptoms Grid */
.symptoms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.symptom-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.symptom-item:hover {
    background: #e9ecef;
    border-color: #E6002B;
}

.symptom-item input:checked + span {
    font-weight: 600;
    color: #E6002B;
}

/* Upload Status */
.upload-status {
    margin-top: 14px;
    padding: 14px;
    border-radius: 8px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .riparazione-hero {
        padding: 120px 20px 70px;
    }

    .riparazione-hero h1 {
        font-size: 2rem;
    }

    .riparazione-hero p {
        font-size: 1.1rem;
    }

    .info-section {
        padding: 60px 20px;
    }

    .info-intro h2 {
        font-size: 1.8rem;
    }

    .accordion-header {
        padding: 20px 22px;
        font-size: 1.05rem;
    }

    .accordion-icon-svg {
        width: 20px;
        height: 20px;
    }

    .accordion-content > div {
        padding: 8px 24px 24px;
    }

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

    .courier-options {
        grid-template-columns: 1fr;
    }

    .courier-header h4 {
        font-size: 1.2rem;
    }

    .courier-price {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .riparazione-hero {
        padding: 110px 16px 60px;
    }

    .riparazione-hero h1 {
        font-size: 1.7rem;
    }

    .info-section {
        padding: 50px 16px;
    }

    .accordion-header {
        padding: 18px 20px;
    }

    .accordion-content > div {
        padding: 8px 20px 20px;
    }

    .cta-container .btn {
        width: 100%;
    }

    .booking-container {
        padding-top: 40px;
    }
}
