/* ===== HIPAA COMPLIANCE & MEDICAL SECURITY STYLES ===== */
/* Enterprise Medical Data Protection & Privacy Controls */

/* HIPAA Privacy Banner */
.hipaa-privacy-banner {
    position: fixed;
    top: 120px; /* After emergency banner */
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, #1e40af 0%, #1e40af 100%);
    color: #ffffff;
    padding: 0.75rem 0;
    z-index: 999;
    box-shadow: 0 4px 20px rgba(30, 64, 175, 0.3);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hipaa-privacy-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 0;
}

.hipaa-privacy-icon {
    font-size: 2rem;
    color: #60a5fa;
    min-width: 60px;
    text-align: center;
}

.hipaa-privacy-text {
    flex: 1;
}

.hipaa-privacy-text h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: #ffffff;
}

.hipaa-privacy-text p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.hipaa-privacy-actions {
    display: flex;
    gap: 0.75rem;
}

/* HIPAA Buttons */
.hipaa-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-height: 44px;
    background: none;
    font-family: var(--font-primary);
}

.hipaa-btn--rights {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}

.hipaa-btn--rights:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.hipaa-btn--privacy {
    background: rgba(16, 185, 129, 0.2);
    color: #ffffff;
    border-color: rgba(16, 185, 129, 0.4);
}

.hipaa-btn--privacy:hover {
    background: rgba(16, 185, 129, 0.3);
    border-color: rgba(16, 185, 129, 0.6);
    transform: translateY(-1px);
}

.hipaa-btn--primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    border-color: transparent;
}

.hipaa-btn--primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.hipaa-btn--secondary {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.3);
}

.hipaa-btn--secondary:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
}

/* HIPAA Form Security Elements */
.hipaa-protected {
    position: relative;
}

.hipaa-protected:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.hipaa-encryption-notice {
    background: linear-gradient(135deg, #065f46 0%, #047857 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    padding: 1rem;
    margin: 1rem 0;
    color: #ffffff;
}

.hipaa-security-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.hipaa-security-badge i {
    font-size: 1.5rem;
    color: #34d399;
}

.hipaa-security-text strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    color: #34d399;
}

.hipaa-security-text span {
    display: block;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
}

.hipaa-notice-text {
    font-size: 0.875rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.hipaa-notice-text i {
    margin-top: 0.125rem;
    color: #34d399;
    font-size: 0.875rem;
}

/* HIPAA Data Processing & Consent */
.hipaa-data-processing {
    background: rgba(30, 64, 175, 0.05);
    border: 2px solid rgba(30, 64, 175, 0.2);
    border-radius: 12px;
    padding: 1.25rem;
    margin: 1rem 0;
}

.hipaa-consent-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hipaa-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    line-height: 1.5;
}

.hipaa-consent-checkbox {
    width: 18px;
    height: 18px;
    margin-top: 0.125rem;
    accent-color: #3b82f6;
    cursor: pointer;
}

.hipaa-consent-text {
    font-size: 0.875rem;
    color: var(--text-color);
    flex: 1;
}

.hipaa-consent-details {
    margin-left: 2.125rem;
}

.hipaa-link {
    background: none;
    border: none;
    color: #3b82f6;
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.875rem;
    font-family: var(--font-primary);
}

.hipaa-link:hover {
    color: #2563eb;
    text-decoration: none;
}

/* HIPAA Modal System */
.hipaa-modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hipaa-modal-container.hidden {
    display: none;
}

.hipaa-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(4px);
}

.hipaa-modal {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--gray-300);
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    max-width: 600px;
    max-height: 90vh;
    width: 90%;
    overflow: hidden;
    z-index: 10001;
}

.hipaa-modal--large {
    max-width: 900px;
}

.hipaa-modal-header {
    background: linear-gradient(135deg, #1e40af 0%, #1e40af 100%);
    color: #ffffff;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hipaa-modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.hipaa-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.hipaa-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.hipaa-modal-body {
    padding: 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
}

/* Patient Rights Grid */
.hipaa-rights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.hipaa-right-item {
    background: var(--bg-card);
    border: 1px solid var(--gray-300);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.hipaa-right-item:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.1);
}

.hipaa-right-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

.hipaa-right-item h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.75rem;
}

.hipaa-right-item p {
    font-size: 0.875rem;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 1rem;
}

/* Privacy Officer Contact */
.hipaa-privacy-officer {
    background: var(--bg-card);
    border: 1px solid var(--gray-300);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.hipaa-privacy-officer h4 {
    color: var(--text-color);
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hipaa-contact-info {
    display: grid;
    gap: 0.5rem;
}

.hipaa-contact-info p {
    font-size: 0.875rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hipaa-contact-info strong {
    color: var(--text-color);
    font-weight: 600;
}

.hipaa-contact-info i {
    color: #3b82f6;
    width: 16px;
}

/* Patient Portal Features */
.hipaa-portal-section {
    text-align: center;
}

.hipaa-portal-section h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.75rem;
}

.hipaa-portal-section p {
    font-size: 0.875rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.hipaa-portal-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.hipaa-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 8px;
    font-size: 0.875rem;
    color: var(--text-color);
}

.hipaa-feature i {
    color: #3b82f6;
    font-size: 1rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .hipaa-privacy-banner {
        top: 100px; /* Adjust for smaller emergency banner */
    }
    
    .hipaa-privacy-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1rem 0;
    }
    
    .hipaa-privacy-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .hipaa-btn {
        min-width: 120px;
        font-size: 0.8rem;
        padding: 0.6rem 0.875rem;
    }
    
    .hipaa-modal {
        width: 95%;
        max-height: 95vh;
    }
    
    .hipaa-rights-grid {
        grid-template-columns: 1fr;
    }
    
    .hipaa-portal-features {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hipaa-privacy-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .hipaa-btn {
        width: 100%;
        justify-content: center;
    }
    
    .hipaa-consent-label {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .hipaa-consent-details {
        margin-left: 0;
        text-align: center;
    }
}

/* HIPAA Compliance Indicators */
.hipaa-compliant::before {
    content: "🛡️ HIPAA";
    position: absolute;
    top: -8px;
    right: -8px;
    background: #10b981;
    color: #ffffff;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    z-index: 10;
}

/* Security Status Indicators */
.security-status-bar {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(16, 185, 129, 0.9);
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.security-status-bar i {
    font-size: 0.875rem;
}

/* Audit Trail Indicator (for development) */
.audit-indicator {
    position: fixed;
    top: 50%;
    right: -2px;
    width: 4px;
    height: 60px;
    background: linear-gradient(180deg, #10b981 0%, #059669 100%);
    border-radius: 2px 0 0 2px;
    z-index: 999;
    opacity: 0.7;
}

.audit-indicator.active {
    animation: auditPulse 2s ease-in-out infinite;
}

@keyframes auditPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; background: #34d399; }
}