/* Second Opinion Website Styles - Exact React Component Match */

/* Main Layout - Exact React Match */
.second-opinion-main-section {
    background: #f1f5f9;
    min-height: 100vh;
    padding: 4rem 0;
}

.second-opinion-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.second-opinion-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

/* Left Content - Scrollable */
.second-opinion-content {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

/* Right Form - Sticky */
.second-opinion-form-wrapper {
    position: sticky;
    top: 7rem;
}

.second-opinion-form {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Typography */
.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Content Sections - Exact React Match */
.content-section {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    color: #475569;
    line-height: 1.75;
}

.content-section h2 {
    color: #1e293b;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.content-section h2 i {
    width: 1.75rem;
    height: 1.75rem;
    color: #667eea;
}

.content-section p {
    margin-bottom: 1rem;
    color: #475569;
}

.content-section ul,
.content-section ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.content-section li {
    margin-bottom: 1rem;
    color: #475569;
}

.content-section li strong {
    color: #1e293b;
    font-weight: 600;
}

/* Form Styling */
.second-opinion-form h3 {
    color: #1a202c;
    margin-bottom: 2rem;
    text-align: center;
}

.second-opinion-form .form-group {
    margin-bottom: 1.5rem;
}

.second-opinion-form label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.second-opinion-form input,
.second-opinion-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fafafa;
}

.second-opinion-form input:focus,
.second-opinion-form textarea:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Validation Error States */
.second-opinion-form input.is-invalid,
.second-opinion-form textarea.is-invalid {
    border-color: #dc2626;
    background: #fef2f2;
}

.second-opinion-form input.is-invalid:focus,
.second-opinion-form textarea.is-invalid:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.second-opinion-form .form-group.has-error label {
    color: #dc2626;
}

.second-opinion-form .form-group.has-error::after {
    content: '*';
    color: #dc2626;
    margin-left: 0.25rem;
}

/* Addon Service Cards - Exact React Match */
.addon-service-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    user-select: none;
}

.addon-service-card:hover {
    background: #f1f5f9;
}

.addon-service-card.selected {
    background: #f8fafc;
    border-color: #e2e8f0;
}

/* Custom Checkbox Styling - React-like */
.addon-service-card input[type="checkbox"] {
    width: 22px;
    height: 22px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    background-color: white;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    flex-shrink: 0;
}

.addon-service-card input[type="checkbox"]:hover {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.1);
}

.addon-service-card input[type="checkbox"]:checked {
    background: #8b5cf6;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.addon-service-card input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
    font-family: Arial, sans-serif;
}

.addon-service-content {
    flex: 1;
    cursor: pointer;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 500;
    font-size: 0.875rem;
    color: #1f2937;
}

.addon-service-card .addon-price {
    font-weight: 600;
    color: #4b5563;
    font-size: 0.875rem;
}

.addon-service-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    color: #667eea;
}

/* Enhanced File Upload */
.file-upload-container {
    margin-top: 0.5rem;
}

.file-upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 0.75rem;
    padding: 2.5rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.file-upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.file-upload-area:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, #f0f4ff 0%, #e0e7ff 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.file-upload-area:hover::before {
    opacity: 1;
}

.file-upload-area.dragover {
    border-color: #667eea;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    transform: scale(1.02);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.2);
}

.file-upload-area .fa-cloud-upload {
    color: #667eea;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.file-upload-area:hover .fa-cloud-upload {
    transform: scale(1.1);
}

.file-upload-text {
    margin: 1rem 0 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: #374151;
    position: relative;
    z-index: 1;
}

.file-upload-hint {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.file-upload-area .btn {
    position: relative;
    z-index: 1;
    margin-top: 0.5rem;
}

.uploaded-files-list {
    margin-top: 1.5rem;
    max-height: 300px;
    overflow-y: auto;
}

.uploaded-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.uploaded-file-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
}

.uploaded-file-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.file-icon {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    font-weight: bold;
}

.file-icon.pdf {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.file-icon.doc {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.file-icon.image {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.file-icon.video {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.file-icon.audio {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.file-icon.default {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

.uploaded-file-details {
    flex: 1;
}

.uploaded-file-name {
    font-weight: 600;
    color: #374151;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    word-break: break-word;
}

.uploaded-file-size {
    font-size: 0.8rem;
    color: #6b7280;
}

.remove-file-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.remove-file-btn:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.4);
}

/* Pricing Summary - Exact React Match */
.pricing-summary {
    background: #dbeafe;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Submit Button - Exact React Match */
.submit-btn {
    background: linear-gradient(to right, #2563eb, #9333ea);
    border: none;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 0.375rem;
    font-size: 1.125rem;
    font-weight: 500;
    width: 100%;
    margin-top: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background: linear-gradient(to right, #1d4ed8, #7c3aed);
}

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

.content-section {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    margin-bottom: 2rem;
}

.content-section h2 {
    margin-bottom: 1rem;
}

.content-section h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.content-section ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.content-section li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.success-message {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

/* Responsive Design - Exact React Match */
@media (max-width: 1024px) {
    .second-opinion-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .second-opinion-form-wrapper {
        position: static;
        top: auto;
    }

    .second-opinion-main-section {
        padding: 2rem 0;
    }
}

@media (max-width: 768px) {
    .second-opinion-container {
        padding: 0 1rem;
    }

    .second-opinion-layout {
        gap: 1.5rem;
    }

    .content-section {
        padding: 1.5rem;
    }

    .second-opinion-form {
        padding: 1.5rem;
    }

    .addon-service-card {
        padding: 1rem;
    }

    .addon-service-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .pricing-summary {
        padding: 1rem;
    }

    .submit-btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }

    .gradient-text {
        font-size: 1.25rem;
    }
}

/* Portal Styles */
.portal-second-opinion-card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.portal-second-opinion-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-badge.draft {
    background: #f3f4f6;
    color: #374151;
}

.status-badge.submitted {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-badge.quoted {
    background: #fef3c7;
    color: #d97706;
}

.status-badge.paid {
    background: #d1fae5;
    color: #059669;
}

.status-badge.in_progress {
    background: #e0e7ff;
    color: #5b21b6;
}

.status-badge.completed {
    background: #dcfce7;
    color: #16a34a;
}

.status-badge.cancelled {
    background: #fee2e2;
    color: #dc2626;
}