/* Hebrew Cookie Consent Plugin Styles - All classes prefixed with "hcc-" to avoid conflicts */
@import url('https://fonts.googleapis.com/css2?family=Assistant:wght@300;400;500;600;700&display=swap');

/* Main Cookie Banner */
.hcc-cookie-banner {
    position: fixed;
    bottom: 20px;
    background: white;
    color: #1f2937;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    display: none;
    direction: rtl;
    width: 380px;
    max-width: calc(100vw - 40px);
    border: 1px solid #e5e7eb;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Assistant', sans-serif;
}

.hcc-cookie-banner.hcc-show {
    display: block;
    opacity: 1;
}

/* Banner Position Variations */
.hcc-cookie-banner.hcc-position-left {
    left: 20px !important;
    right: auto !important;
    transform: translateX(0) translateY(20px) !important;
}

.hcc-cookie-banner.hcc-position-left.hcc-show {
    transform: translateX(0) translateY(0) !important;
}

.hcc-cookie-banner.hcc-position-right {
    right: 20px !important;
    left: auto !important;
    transform: translateX(0) translateY(20px) !important;
}

.hcc-cookie-banner.hcc-position-right.hcc-show {
    transform: translateX(0) translateY(0) !important;
}

.hcc-cookie-banner.hcc-position-center {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) translateY(20px) !important;
}

.hcc-cookie-banner.hcc-position-center.hcc-show {
    transform: translateX(-50%) translateY(0) !important;
}

.hcc-cookie-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    gap: 8px;
}

.hcc-cookie-icon {
    font-size: 24px;
    filter: brightness(0.9);
}

.hcc-cookie-banner h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: #111827;
    text-align: center;
}

.hcc-cookie-banner p {
    margin: 0 0 24px 0;
    line-height: 1.5;
    color: #4b5563;
    text-align: center;
    font-size: 16px;
}

.hcc-cookie-banner p a {
    color: #1f2937;
    text-decoration: underline;
    cursor: pointer;
}

.hcc-cookie-banner p a:hover {
    color: #111827;
}

.hcc-cookie-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hcc-cookie-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    text-align: center;
    font-family: 'Assistant', sans-serif;
}

.hcc-cookie-btn.hcc-accept {
    background: #1f2937;
    color: white;
    order: 1;
}

.hcc-cookie-btn.hcc-accept:hover {
    background: #111827;
    transform: translateY(-1px);
}

.hcc-cookie-btn.hcc-reject {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    order: 2;
}

.hcc-cookie-btn.hcc-reject:hover {
    background: #e5e7eb;
}

.hcc-cookie-btn.hcc-preferences {
    background: #485872;
    color: white;
    order: 3;
}

.hcc-cookie-btn.hcc-preferences:hover {
    background: #425778;
    transform: translateY(-1px);
}

.hcc-cookie-btn.hcc-privacy {
    background: transparent;
    color: #6b7280;
    font-weight: 500;
    padding: 8px 12px;
    font-size: 13px;
    order: 4;
}

.hcc-cookie-btn.hcc-privacy:hover {
    color: #374151;
    text-decoration: underline;
}

/* Preferences and Privacy Modal */
.hcc-preferences-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 20000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
    font-family: 'Assistant', sans-serif;
}

.hcc-preferences-modal.hcc-show {
    display: flex;
}

.hcc-preferences-content {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 500px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    direction: rtl;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    text-align: right;
}

.hcc-preferences-content h3 {
    margin: 0 0 24px 0;
    color: #111827;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
}

.hcc-preference-category {
    margin-bottom: 20px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
}

.hcc-preference-category h4 {
    margin: 0 0 8px 0;
    color: #111827;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 15px;
    font-weight: 600;
}

.hcc-preference-category p {
    margin: 0;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.4;
}

.hcc-toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.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: #d1d5db;
    border-radius: 24px;
    transition: .3s;
}

.hcc-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    border-radius: 50%;
    transition: .3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .hcc-toggle-slider {
    background-color: #7bb142;
}

input:disabled + .hcc-toggle-slider {
    background-color: #9ca3af;
    cursor: not-allowed;
}

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

.hcc-preferences-buttons {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.hcc-preferences-buttons .hcc-cookie-btn {
    flex: 1;
}

/* Privacy Policy Modal Content */
.hcc-privacy-policy-content {
    text-align: right;
    line-height: 1.6;
    color: #374151;
    white-space: pre-line;
}

/* Status Messages */
.hcc-status {
    margin: 20px 0;
    padding: 16px;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    font-family: 'Assistant', sans-serif;
}

.hcc-status.hcc-accepted {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.hcc-status.hcc-rejected {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Demo Content Styles (for testing/demo pages) */
.hcc-demo-content {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 100px;
    font-family: 'Assistant', sans-serif;
    direction: rtl;
}

.hcc-demo-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.hcc-demo-btn {
    padding: 10px 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    color: #374151;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    font-family: 'Assistant', sans-serif;
}

.hcc-demo-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.hcc-warning-box {
    background: #fef3c7;
    padding: 16px;
    border-radius: 8px;
    border-right: 4px solid #f59e0b;
    margin: 20px 0;
    font-family: 'Assistant', sans-serif;
    direction: rtl;
}

/* Button Color Customization */
.hcc-cookie-banner {
    --hcc-accept-bg: #1f2937;
    --hcc-reject-bg: #f3f4f6;
    --hcc-preferences-bg: #485872;
    --hcc-accept-text-color: #ffffff;
    --hcc-reject-text-color: #ffffff;
    --hcc-preferences-text-color: #ffffff;
}

/* Custom button colors can be overridden via inline styles */
.hcc-cookie-btn.hcc-accept.hcc-custom-color {
    background: var(--hcc-accept-color, var(--hcc-accept-bg)) !important;
    color: var(--hcc-accept-text-color, #ffffff) !important;
}

.hcc-cookie-btn.hcc-reject.hcc-custom-color {
    background: var(--hcc-reject-color, var(--hcc-reject-bg)) !important;
    color: var(--hcc-reject-text-color, #ffffff) !important;
    border: none !important;
}

.hcc-cookie-btn.hcc-preferences.hcc-custom-color {
    background: var(--hcc-preferences-color, var(--hcc-preferences-bg)) !important;
    color: var(--hcc-preferences-text-color, #ffffff) !important;
}

/* Mobile responsive */
@media (max-width: 640px) {
    .hcc-cookie-banner, 
    .hcc-cookie-banner.hcc-position-left,
    .hcc-cookie-banner.hcc-position-right,
    .hcc-cookie-banner.hcc-position-center {
        width: calc(85vw - 32px) !important;
        left: 16px !important;
        right: 16px !important;
        transform: none !important;
        bottom: 16px !important;
        padding: 20px !important;
    }
    
    .hcc-cookie-banner.hcc-show,
    .hcc-cookie-banner.hcc-position-left.hcc-show,
    .hcc-cookie-banner.hcc-position-right.hcc-show,
    .hcc-cookie-banner.hcc-position-center.hcc-show {
        transform: none !important;
    }
    
    .hcc-preferences-content {
        padding: 24px;
        margin: 10px;
    }
    
    .hcc-demo-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .hcc-preferences-buttons {
        flex-direction: column;
    }
}

/* WordPress Admin Styles */
.wrap[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

.wrap[dir="rtl"] .form-table th {
    text-align: right;
}

.wrap[dir="rtl"] textarea {
    direction: rtl;
    text-align: right;
}