/* Healthcare Cookie Consent - Frontend Styles */

/* Reset and base styles */
.hcc-banner * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Banner container */
.hcc-banner {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* Position variations */
.hcc-banner-top {
    top: 0;
    border-bottom: 3px solid var(--hcc-primary-color, #007cba);
}

.hcc-banner-bottom {
    bottom: 0;
    border-top: 3px solid var(--hcc-primary-color, #007cba);
}

.hcc-banner-center {
    top: 50%;
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
    max-width: 600px;
    width: 90%;
    border-radius: 8px;
    border: 3px solid var(--hcc-primary-color, #007cba);
}

/* Banner overlay for center position */
.hcc-banner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999998;
}

/* Banner container */
.hcc-banner-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

/* Banner content */
.hcc-banner-content {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .hcc-banner-content {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
}

/* Banner text */
.hcc-banner-text {
    flex: 1;
    min-width: 0;
}

.hcc-banner-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--hcc-text-color, #333);
}

.hcc-banner-message {
    margin: 0;
    color: var(--hcc-text-color, #333);
    opacity: 0.9;
}

.hcc-banner-message a {
    color: var(--hcc-primary-color, #007cba);
    text-decoration: underline;
    font-weight: 500;
}

.hcc-banner-message a:hover {
    text-decoration: none;
}

/* Banner actions */
.hcc-banner-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .hcc-banner-actions {
        justify-content: stretch;
    }
    
    .hcc-banner-actions .hcc-btn {
        flex: 1;
    }
}

/* Buttons */
.hcc-btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-align: center;
    min-width: 100px;
}

.hcc-btn:focus {
    outline: 2px solid var(--hcc-primary-color, #007cba);
    outline-offset: 2px;
}

.hcc-btn-primary {
    background: var(--hcc-primary-color, #007cba);
    color: var(--hcc-button-text-color, #ffffff);
}

.hcc-btn-primary:hover {
    background: #005a87;
    transform: translateY(-1px);
}

.hcc-btn-secondary {
    background: transparent;
    color: var(--hcc-text-color, #333);
    border: 2px solid var(--hcc-primary-color, #007cba);
}

.hcc-btn-secondary:hover {
    background: var(--hcc-primary-color, #007cba);
    color: var(--hcc-button-text-color, #ffffff);
}

.hcc-btn-success {
    background: #28a745;
    color: #ffffff;
}

.hcc-btn-success:hover {
    background: #218838;
}

.hcc-btn-danger {
    background: #dc3545;
    color: #ffffff;
}

.hcc-btn-danger:hover {
    background: #c82333;
}

/* Close button */
.hcc-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--hcc-text-color, #333);
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hcc-close-btn:hover {
    opacity: 1;
}

/* Details panel */
.hcc-details-panel {
    border-top: 1px solid #e0e0e0;
    background: #f9f9f9;
    padding: 20px;
    margin-top: 20px;
    border-radius: 0 0 5px 5px;
}

.hcc-details-content h4 {
    margin-bottom: 15px;
    color: var(--hcc-text-color, #333);
    font-size: 16px;
}

.hcc-details-content p {
    margin-bottom: 20px;
    color: var(--hcc-text-color, #333);
    opacity: 0.9;
}

/* Cookie categories */
.hcc-cookie-categories {
    margin-bottom: 25px;
}

.hcc-cookie-category {
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    background: #ffffff;
}

.hcc-category-header {
    padding: 15px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.hcc-category-info {
    flex: 1;
}

.hcc-category-info h5 {
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 600;
    color: var(--hcc-text-color, #333);
}

.hcc-category-info p {
    margin: 0;
    font-size: 13px;
    color: var(--hcc-text-color, #333);
    opacity: 0.8;
}

.hcc-required {
    font-size: 12px;
    color: #28a745;
    font-weight: normal;
}

/* Toggle switch */
.hcc-toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin-top: 2px;
}

.hcc-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.hcc-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.hcc-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.hcc-toggle-switch input:checked + .hcc-toggle-slider {
    background-color: var(--hcc-primary-color, #007cba);
}

.hcc-toggle-switch input:checked + .hcc-toggle-slider:before {
    transform: translateX(26px);
}

.hcc-toggle-switch input:disabled + .hcc-toggle-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Cookie list */
.hcc-cookie-list {
    padding: 0 15px 15px;
}

.hcc-toggle-cookies {
    background: none;
    border: none;
    color: var(--hcc-primary-color, #007cba);
    cursor: pointer;
    font-size: 13px;
    text-decoration: underline;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.hcc-toggle-cookies:hover {
    text-decoration: none;
}

.hcc-arrow {
    transition: transform 0.2s ease;
}

.hcc-toggle-cookies.active .hcc-arrow {
    transform: rotate(180deg);
}

.hcc-cookies-detail {
    margin-top: 10px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 3px;
}

.hcc-cookie-item {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.hcc-cookie-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.hcc-cookie-item strong {
    display: block;
    font-size: 13px;
    color: var(--hcc-text-color, #333);
    margin-bottom: 3px;
}

.hcc-cookie-item p {
    margin: 0 0 5px 0;
    font-size: 12px;
    color: var(--hcc-text-color, #333);
    opacity: 0.8;
}

.hcc-cookie-item small {
    font-size: 11px;
    color: var(--hcc-text-color, #333);
    opacity: 0.6;
}

/* Details actions */
.hcc-details-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .hcc-details-actions {
        flex-direction: column;
    }
}

/* Style variations */
.hcc-style-modern {
    background: linear-gradient(135deg, var(--hcc-secondary-color, #ffffff) 0%, #f8f9fa 100%);
}

.hcc-style-classic {
    background: var(--hcc-secondary-color, #ffffff);
    border-style: solid;
}

.hcc-style-minimal {
    background: var(--hcc-secondary-color, #ffffff);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Animations */
@keyframes slideInFromBottom {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInFromTop {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.hcc-banner-bottom {
    animation: slideInFromBottom 0.5s ease-out;
}

.hcc-banner-top {
    animation: slideInFromTop 0.5s ease-out;
}

.hcc-banner-center {
    animation: fadeIn 0.3s ease-out;
}

/* Healthcare-specific styling */
.hcc-healthcare-notice {
    background: #e8f4f8;
    border: 1px solid var(--hcc-primary-color, #007cba);
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 15px;
    font-size: 12px;
    color: var(--hcc-text-color, #333);
}

.hcc-healthcare-notice strong {
    color: var(--hcc-primary-color, #007cba);
}

/* Accessibility improvements */
.hcc-banner:focus-within {
    outline: 2px solid var(--hcc-primary-color, #007cba);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .hcc-banner,
    .hcc-banner-overlay {
        display: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .hcc-banner {
        border-width: 2px;
    }
    
    .hcc-btn {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .hcc-banner {
        animation: none;
    }
    
    .hcc-btn,
    .hcc-toggle-slider,
    .hcc-toggle-slider:before {
        transition: none;
    }
}
