/* Multi-Step Modal Styles */
.patient-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    overflow-y: auto;
    padding: 20px;
}

.patient-modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.patient-modal {
    background: white;
    border-radius: 16px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.patient-modal__header {
    padding: 30px 30px 20px;
    border-bottom: 2px solid #f0f0f0;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
    border-radius: 16px 16px 0 0;
}

.patient-modal__close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.patient-modal__close:hover {
    background: #f5f5f5;
    color: #333;
}

.patient-modal__title {
    font-size: 28px;
    font-weight: bold;
    color: #2c3e50;
    margin: 0 0 10px;
}

.patient-modal__subtitle {
    font-size: 14px;
    color: #7f8c8d;
    margin: 0;
}

/* Progress Indicator */
.patient-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
    position: relative;
}

.patient-progress::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 3px;
    background: #e0e0e0;
    z-index: 1;
}

.patient-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    flex: 1;
}

.patient-progress-step__circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 3px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    color: #999;
    transition: all 0.3s ease;
    margin-bottom: 8px;
}

.patient-progress-step__label {
    font-size: 11px;
    color: #999;
    text-align: center;
    max-width: 100px;
    line-height: 1.3;
    transition: all 0.3s ease;
}

.patient-progress-step--completed .patient-progress-step__circle {
    background: #27ae60;
    border-color: #27ae60;
    color: white;
}

.patient-progress-step--completed .patient-progress-step__label {
    color: #27ae60;
    font-weight: 600;
}

.patient-progress-step--active .patient-progress-step__circle {
    background: #3498db;
    border-color: #3498db;
    color: white;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.2);
}

.patient-progress-step--active .patient-progress-step__label {
    color: #3498db;
    font-weight: 600;
}

/* Form Content */
.patient-modal__body {
    padding: 30px;
}

.patient-step {
    display: none;
}

.patient-step--active {
    display: block;
    animation: stepFadeIn 0.4s ease;
}

@keyframes stepFadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.patient-step__title {
    font-size: 22px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 20px;
}

.patient-form-group {
    margin-bottom: 20px;
}

.patient-form-label {
    display: block;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 8px;
    font-size: 14px;
}

.patient-form-label--required::after {
    content: ' *';
    color: #e74c3c;
}

.patient-form-input,
.patient-form-select,
.patient-form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s;
    font-family: inherit;
}

.patient-form-input:focus,
.patient-form-select:focus,
.patient-form-textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.patient-form-textarea {
    resize: vertical;
    min-height: 100px;
}

.patient-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.patient-form-checkbox,
.patient-form-radio {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.patient-form-checkbox input,
.patient-form-radio input {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
}

.patient-form-checkbox label,
.patient-form-radio label {
    cursor: pointer;
    font-size: 14px;
    color: #34495e;
}

.patient-file-upload {
    border: 2px dashed #bdc3c7;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.2s;
    cursor: pointer;
}

.patient-file-upload:hover {
    border-color: #3498db;
    background: #e8f4f8;
}

.patient-file-upload__icon {
    font-size: 48px;
    color: #95a5a6;
    margin-bottom: 10px;
}

.patient-file-upload__text {
    color: #7f8c8d;
    font-size: 14px;
}

.patient-file-list {
    margin-top: 15px;
}

.patient-file-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #ecf0f1;
    border-radius: 6px;
    margin-bottom: 8px;
}

.patient-file-item__icon {
    font-size: 24px;
    margin-right: 10px;
}

.patient-file-item__info {
    flex: 1;
}

.patient-file-item__name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.patient-file-item__size {
    font-size: 12px;
    color: #7f8c8d;
}

.patient-file-item__remove {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
}

.patient-file-item__remove:hover {
    background: #c0392b;
}

/* Modal Footer */
.patient-modal__footer {
    padding: 20px 30px;
    border-top: 2px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fafafa;
    border-radius: 0 0 16px 16px;
    position: sticky;
    bottom: 0;
}

.patient-btn {
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.patient-btn--secondary {
    background: white;
    color: #7f8c8d;
    border: 2px solid #bdc3c7;
}

.patient-btn--secondary:hover {
    background: #ecf0f1;
    border-color: #95a5a6;
}

.patient-btn--primary {
    background: #3498db;
    color: white;
}

.patient-btn--primary:hover {
    background: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.patient-btn--success {
    background: #27ae60;
    color: white;
}

.patient-btn--success:hover {
    background: #229954;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

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

.patient-step-indicator {
    color: #7f8c8d;
    font-size: 14px;
    font-weight: 500;
}

/* Consent Section */
.patient-consent-box {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.patient-consent-box h4 {
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

.patient-consent-box p {
    font-size: 14px;
    color: #495057;
    line-height: 1.6;
    margin-bottom: 15px;
}

.patient-signature-pad {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: white;
    margin-bottom: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .patient-modal {
        max-width: 95%;
        max-height: 95vh;
    }

    .patient-modal__header,
    .patient-modal__body,
    .patient-modal__footer {
        padding: 20px;
    }

    .patient-modal__title {
        font-size: 22px;
    }

    .patient-progress-step__label {
        font-size: 9px;
        max-width: 60px;
    }

    .patient-progress-step__circle {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

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