/**
 * TTFC Cookie Consent - CSS
 * 
 * עיצוב באנר ההסכמה לעוגיות
 * 
 * @package TTFC_Cookie_Consent
 * @version 1.0.0
 */

/* === משתנים === */
:root {
    --ttfc-cookie-bg-light: #ffffff;
    --ttfc-cookie-bg-dark: #1a1a2e;
    --ttfc-cookie-text-light: #333333;
    --ttfc-cookie-text-dark: #f5f5f5;
    --ttfc-cookie-border-light: #e0e0e0;
    --ttfc-cookie-border-dark: #444444;
    --ttfc-cookie-primary: var(--primary-color-jhhd, #DE0100);
    --ttfc-cookie-primary-hover: var(--primary-color-dark-jhhd, #b30000);
    --ttfc-cookie-secondary: #6c757d;
    --ttfc-cookie-secondary-hover: #545b62;
    --ttfc-cookie-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    --ttfc-cookie-radius: 8px;
    --ttfc-cookie-transition: all 0.3s ease;
    --ttfc-cookie-z-index: 999999;
}

/* === באנר - בסיס === */
.ttfc-cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    z-index: var(--ttfc-cookie-z-index);
    padding: 20px;
    box-shadow: var(--ttfc-cookie-shadow);
    font-family: inherit;
    direction: rtl;
    text-align: right;
    opacity: 0;
    transform: translateY(100%);
    transition: var(--ttfc-cookie-transition);
}

.ttfc-cookie-banner.ttfc-cookie-visible {
    opacity: 1;
    transform: translateY(0);
}

/* === מיקומים === */
.ttfc-cookie-bottom {
    bottom: 0;
}

.ttfc-cookie-top {
    top: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
}

.ttfc-cookie-top.ttfc-cookie-visible {
    transform: translateY(0);
}

.ttfc-cookie-bottom-left,
.ttfc-cookie-bottom-right {
    bottom: 20px;
    left: auto;
    right: auto;
    max-width: 400px;
    border-radius: var(--ttfc-cookie-radius);
}

.ttfc-cookie-bottom-left {
    left: 20px;
    right: auto;
}

.ttfc-cookie-bottom-right {
    right: 20px;
    left: auto;
}

/* === עיצובים (layouts) === */
.ttfc-cookie-bar .ttfc-cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.ttfc-cookie-box .ttfc-cookie-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* === ערכות נושא === */
.ttfc-cookie-light {
    background-color: var(--ttfc-cookie-bg-light);
    color: var(--ttfc-cookie-text-light);
    border-top: 1px solid var(--ttfc-cookie-border-light);
}

.ttfc-cookie-dark {
    background-color: var(--ttfc-cookie-bg-dark);
    color: var(--ttfc-cookie-text-dark);
    border-top: 1px solid var(--ttfc-cookie-border-dark);
}

/* === טקסט הודעה === */
.ttfc-cookie-message {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    flex: 1;
    min-width: 200px;
}

.ttfc-cookie-message a {
    color: var(--ttfc-cookie-primary);
    text-decoration: underline;
}

.ttfc-cookie-message a:hover {
    color: var(--ttfc-cookie-primary-hover);
}

/* === כפתורים === */
.ttfc-cookie-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ttfc-cookie-btn {
    padding: 10px 20px;
    background-color: transparent;
    border: 1px solid var(--secondary-color-jhhd, #1B365D);
    color: var(--secondary-color-jhhd, #1B365D);
    border-radius: var(--ttfc-cookie-radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: var(--ttfc-cookie-transition);
    font-family: inherit;
    white-space: nowrap;
}

.ttfc-cookie-btn:hover {
    background-color: var(--secondary-color-jhhd, #1B365D);
    color: #ffffff;
}

.ttfc-cookie-btn:focus {
    outline: 2px solid var(--secondary-color-jhhd, #1B365D);
    outline-offset: 2px;
}

/* כל הכפתורים בעיצוב אחיד */
.ttfc-cookie-btn-accept,
.ttfc-cookie-btn-decline,
.ttfc-cookie-btn-settings,
.ttfc-cookie-btn-outline {
    background-color: transparent;
    border: 1px solid var(--secondary-color-jhhd, #1B365D);
    color: var(--secondary-color-jhhd, #1B365D);
}

.ttfc-cookie-btn-accept:hover,
.ttfc-cookie-btn-decline:hover,
.ttfc-cookie-btn-settings:hover,
.ttfc-cookie-btn-outline:hover {
    background-color: var(--secondary-color-jhhd, #1B365D);
    color: #ffffff;
}

/* התאמה לערכת כהה */
.ttfc-cookie-dark .ttfc-cookie-btn {
    border-color: var(--secondary-color-jhhd, #1B365D);
    color: var(--secondary-color-jhhd, #1B365D);
}

.ttfc-cookie-dark .ttfc-cookie-btn:hover {
    background-color: var(--secondary-color-jhhd, #1B365D);
    color: #ffffff;
}

/* === מודאל הגדרות === */
.ttfc-cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: calc(var(--ttfc-cookie-z-index) + 1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: var(--ttfc-cookie-transition);
}

.ttfc-cookie-modal.ttfc-cookie-modal-visible {
    opacity: 1;
    visibility: visible;
}

.ttfc-cookie-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
}

.ttfc-cookie-modal-content {
    position: relative;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 30px;
    border-radius: var(--ttfc-cookie-radius);
    direction: rtl;
    text-align: right;
    transform: scale(0.9);
    transition: var(--ttfc-cookie-transition);
}

.ttfc-cookie-modal.ttfc-cookie-modal-visible .ttfc-cookie-modal-content {
    transform: scale(1);
}

.ttfc-cookie-modal.ttfc-cookie-light .ttfc-cookie-modal-content {
    background-color: var(--ttfc-cookie-bg-light);
    color: var(--ttfc-cookie-text-light);
}

.ttfc-cookie-modal.ttfc-cookie-dark .ttfc-cookie-modal-content {
    background-color: var(--ttfc-cookie-bg-dark);
    color: var(--ttfc-cookie-text-dark);
}

.ttfc-cookie-modal-close {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.7;
    transition: var(--ttfc-cookie-transition);
    line-height: 1;
}

.ttfc-cookie-modal-close:hover {
    opacity: 1;
}

.ttfc-cookie-modal.ttfc-cookie-light .ttfc-cookie-modal-close {
    color: var(--ttfc-cookie-text-light);
}

.ttfc-cookie-modal.ttfc-cookie-dark .ttfc-cookie-modal-close {
    color: var(--ttfc-cookie-text-dark);
}

.ttfc-cookie-modal-title {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 700;
}

/* === קטגוריות עוגיות === */
.ttfc-cookie-categories {
    margin-bottom: 20px;
}

.ttfc-cookie-category {
    padding: 15px 0;
    border-bottom: 1px solid var(--ttfc-cookie-border-light);
}

.ttfc-cookie-dark .ttfc-cookie-category {
    border-bottom-color: var(--ttfc-cookie-border-dark);
}

.ttfc-cookie-category:last-child {
    border-bottom: none;
}

.ttfc-cookie-category-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.ttfc-cookie-category-name {
    font-weight: 600;
    font-size: 15px;
}

.ttfc-cookie-required {
    font-size: 12px;
    color: var(--ttfc-cookie-secondary);
    font-weight: normal;
}

.ttfc-cookie-category-description {
    margin: 0;
    font-size: 13px;
    color: var(--ttfc-cookie-secondary);
    line-height: 1.5;
}

/* === מתג Toggle === */
.ttfc-cookie-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.ttfc-cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ttfc-cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: var(--ttfc-cookie-transition);
    border-radius: 24px;
}

.ttfc-cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    right: 3px;
    bottom: 3px;
    background-color: white;
    transition: var(--ttfc-cookie-transition);
    border-radius: 50%;
}

.ttfc-cookie-toggle input:checked + .ttfc-cookie-toggle-slider {
    background-color: var(--ttfc-cookie-primary);
}

.ttfc-cookie-toggle input:checked + .ttfc-cookie-toggle-slider:before {
    transform: translateX(-20px);
}

.ttfc-cookie-toggle input:disabled + .ttfc-cookie-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* === כפתורי המודאל === */
.ttfc-cookie-modal-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
}

/* === רספונסיביות === */
@media (max-width: 768px) {
    .ttfc-cookie-banner {
        padding: 15px;
    }
    
    .ttfc-cookie-bar .ttfc-cookie-content {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .ttfc-cookie-message {
        text-align: center;
        margin-bottom: 10px;
    }
    
    .ttfc-cookie-buttons {
        justify-content: center;
    }
    
    .ttfc-cookie-bottom-left,
    .ttfc-cookie-bottom-right {
        left: 10px;
        right: 10px;
        max-width: none;
        bottom: 10px;
    }
    
    .ttfc-cookie-modal-content {
        padding: 20px;
        max-height: 90vh;
    }
    
    .ttfc-cookie-modal-buttons {
        justify-content: stretch;
    }
    
    .ttfc-cookie-modal-buttons .ttfc-cookie-btn {
        flex: 1;
        min-width: 100px;
    }
}

/* === נגישות === */
@media (prefers-reduced-motion: reduce) {
    .ttfc-cookie-banner,
    .ttfc-cookie-modal,
    .ttfc-cookie-modal-content,
    .ttfc-cookie-btn,
    .ttfc-cookie-toggle-slider,
    .ttfc-cookie-toggle-slider:before {
        transition: none;
    }
}

/* === הדפסה === */
@media print {
    .ttfc-cookie-banner,
    .ttfc-cookie-modal {
        display: none !important;
    }
}

/* === סגנון לכפתור הגדרות עוגיות בתוכן === */
.ttfc-cookie-settings-link {
    background: none;
    border: none;
    color: var(--ttfc-cookie-primary);
    cursor: pointer;
    text-decoration: underline;
    font-size: inherit;
    font-family: inherit;
    padding: 0;
}

.ttfc-cookie-settings-link:hover {
    color: var(--ttfc-cookie-primary-hover);
}

/* === סטטוס הסכמה === */
.ttfc-cookie-status {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: var(--ttfc-cookie-radius);
    border: 1px solid var(--ttfc-cookie-border-light);
}

.ttfc-cookie-status p {
    margin: 5px 0;
}

.ttfc-cookie-status ul {
    margin: 5px 0;
    padding-right: 20px;
}
