/* Patient Authentication System - Styles */

.patient-auth-container {
    max-width: 500px;
    margin: 4rem auto 4rem auto !important;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.patient-login-form h2 {
    text-align: center;
    color: #2c5aa0;
    margin-bottom: 30px;
    font-size: 2rem;
}

.patient-messages {
    margin-bottom: 20px;
}

.patient-message {
    padding: 12px 15px;
    border-radius: 5px;
    margin-bottom: 10px;
    font-weight: 500;
}

.patient-message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.patient-message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.patient-message-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.patient-form {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #2c5aa0;
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

/* Login Type Buttons */
.login-type-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.login-type-btn {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    background: #fff;
    color: #666;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-type-btn:hover {
    border-color: #2c5aa0;
    color: #2c5aa0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 90, 160, 0.15);
}

.login-type-btn.active {
    border-color: #2c5aa0;
    background: #2c5aa0;
    color: white;
    box-shadow: 0 4px 12px rgba(44, 90, 160, 0.2);
}

.login-type-btn i {
    font-size: 18px;
}

.form-help {
    display: block;
    margin-top: 5px;
    font-size: 14px;
    color: #666;
    font-style: italic;
}

.form-actions {
    text-align: center;
    margin-top: 30px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #2c5aa0;
    color: white;
}

.btn-primary:hover {
    background: #1e3a8a;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(44, 90, 160, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.login-help {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    border-left: 4px solid #2c5aa0;
}

.login-help h3 {
    margin-bottom: 15px;
    color: #2c5aa0;
}

.login-help ul {
    margin: 0;
    padding-left: 20px;
}

.login-help li {
    margin-bottom: 8px;
    color: #555;
}

/* Dashboard Styles */
.patient-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.patient-dashboard h2 {
    color: #2c5aa0;
    margin-bottom: 30px;
    text-align: center;
}

/* Dashboard Grid Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.dashboard-column {
    display: flex;
    flex-direction: column;
}

.patient-info,
.doctor-selection,
.family-members {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #2c5aa0;
    flex: 1;
    height: fit-content;
}

.patient-info h3,
.doctor-selection h3,
.family-members h3 {
    color: #2c5aa0;
    margin-bottom: 15px;
}

.patient-info p {
    margin-bottom: 10px;
    color: #555;
}

.doctor-selected {
    background: #d4edda;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #c3e6cb;
}

.no-doctor-selected {
    text-align: center;
    padding: 20px;
}

.alert {
    padding: 15px;
    border-radius: 5px;
    margin-top: 15px;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.dashboard-actions {
    text-align: center;
    margin-top: 30px;
}

/* Doctor Form Styles */
.patient-doctor-form {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.patient-doctor-form h2 {
    color: #2c5aa0;
    margin-bottom: 20px;
    text-align: center;
}

.form-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 25px;
    border-left: 4px solid #2c5aa0;
}

.form-section h3 {
    color: #2c5aa0;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.phone-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.phone-group {
    display: flex;
    flex-direction: column;
}

.phone-group label {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.doctors-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.doctor-card {
    background: white;
    border: 3px solid #e1e5e9;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.doctor-card:hover {
    border-color: #2c5aa0;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(44, 90, 160, 0.15);
}

.doctor-card.selected {
    border-color: #2c5aa0;
    background: linear-gradient(135deg, #e6f3ff 0%, #f0f8ff 100%);
    box-shadow: 0 8px 25px rgba(44, 90, 160, 0.2);
}

.doctor-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.doctor-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c5aa0;
    margin-bottom: 10px;
}

.doctor-specialty {
    color: #666;
    font-size: 1rem;
    margin-bottom: 15px;
}

.doctor-info {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

.doctor-info strong {
    color: #2c5aa0;
}

.warning-message {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
    font-weight: 600;
    text-align: center;
}

/* Family Members Styles */
.family-members-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.family-member-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.member-info h4 {
    color: #2c5aa0;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.member-info p {
    margin-bottom: 5px;
    color: #555;
    font-size: 0.9rem;
}

.no-family-members {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .phone-inputs {
        grid-template-columns: 1fr;
    }
    
    .doctors-grid {
        grid-template-columns: 1fr;
    }
    
    .patient-auth-container,
    .patient-dashboard,
    .patient-doctor-form {
        margin: 10px;
        padding: 15px;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2c5aa0;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Form Validation */
.form-group.error input,
.form-group.error select {
    border-color: #dc3545;
}

.form-group.error .error-message {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
}

.form-group.success input,
.form-group.success select {
    border-color: #28a745;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* Doctor Information Sections */
.doctor-info-section {
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.doctor-info-section h4 {
    margin: 0;
    padding: 12px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    font-size: 1.1rem;
    color: #495057;
}

.doctor-current {
    background: #e3f2fd;
    padding: 16px;
    border-left: 4px solid #2196f3;
}

.doctor-selected {
    background: #e8f5e8;
    padding: 16px;
    border-left: 4px solid #4caf50;
}

.no-doctor-selected {
    background: #fff3e0;
    padding: 16px;
    border-left: 4px solid #ff9800;
}

.info-text {
    color: #666;
    font-style: italic;
    margin-top: 8px;
    font-size: 0.9rem;
}

.alert {
    padding: 12px 16px;
    border-radius: 4px;
    margin-top: 12px;
}

.alert-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background: white;
    color: #2c5aa0;
    text-decoration: none;
    border-radius: 4px;
    border: 2px solid white;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.btn:hover {
    background: #f8f9fa;
    color: #1e3a5f;
}

.btn-primary {
    background: #007cba;
}

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:hover {
    background: #545b62;
}

/* Patient Type Badges */
.patient-type-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.patient-type-principal {
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.patient-type-membru-familie {
    background: #f3e5f5;
    color: #7b1fa2;
    border: 1px solid #ce93d8;
}

/* Admin Table Enhancements */
.wp-list-table th {
    font-weight: 600;
    background: #f1f1f1;
}

.wp-list-table td {
    vertical-align: middle;
}