/* Simple Cookie Consent Styles */

/* Banner Styles */
.scc-banner {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 999999;
    background: #2c3e50;
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    direction: rtl;
    text-align: right;
    min-height: 80px;
}

/* Desktop positioning */
@media (min-width: 769px) {
    .scc-banner-top-desktop {
        top: 0;
        bottom: auto;
    }
    
    .scc-banner-bottom-desktop {
        bottom: 0;
        top: auto;
    }
}

/* Mobile positioning */
@media (max-width: 768px) {
    .scc-banner-top-mobile {
        top: 0;
        bottom: auto;
    }
    
    .scc-banner-bottom-mobile {
        bottom: 0;
        top: auto;
    }
}

/* Legacy position classes for backward compatibility */
.scc-banner-top {
    top: 0;
}

.scc-banner-bottom {
    bottom: 0;
}

.scc-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    min-height: inherit;
}

/* Button positioning variations */
.scc-banner-content.scc-buttons-right {
    flex-direction: row;
}

.scc-banner-content.scc-buttons-left {
    flex-direction: row;
}

.scc-banner-content.scc-buttons-left .scc-banner-buttons {
    order: -1;
}

.scc-banner-content.scc-buttons-below {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.scc-banner-content.scc-buttons-below .scc-banner-text {
    text-align: center;
    margin-bottom: 0;
}

.scc-banner-content.scc-buttons-below .scc-banner-buttons {
    justify-content: center;
    margin-top: 0;
}

.scc-banner-text {
    flex: 1;
    min-width: 300px;
}

.scc-banner-text a.scc-privacy-link {
    color: #3498db;
    text-decoration: underline;
    margin-right: 10px;
}

.scc-banner-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* RTL Support */
.scc-rtl .scc-banner-content {
    direction: rtl;
}

.scc-rtl .scc-banner-text a.scc-privacy-link {
    margin-left: 0;
    margin-right: 10px;
}

.scc-rtl .scc-banner-buttons {
    flex-direction: row-reverse;
}

/* Button Styles */
.scc-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    direction: rtl;
}

.scc-btn-accept,
.scc-btn-accept-all {
    background: #27ae60;
    color: white;
}

.scc-btn-accept:hover,
.scc-btn-accept-all:hover {
    background: #219a52;
    transform: translateY(-1px);
}

.scc-btn-decline {
    background: #e74c3c;
    color: white;
}

.scc-btn-decline:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

.scc-btn-settings {
    background: #95a5a6;
    color: white;
}

.scc-btn-settings:hover {
    background: #7f8c8d;
    transform: translateY(-1px);
}

/* Button loading state */
.scc-btn.scc-loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.scc-btn.scc-loading:after {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal Styles */
.scc-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.scc-modal-content {
    background: white;
    border-radius: 8px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    direction: rtl;
    text-align: right;
}

.scc-modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    direction: rtl;
}

.scc-modal-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 18px;
}

.scc-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #95a5a6;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.scc-close:hover {
    color: #2c3e50;
    background: #f8f9fa;
}

.scc-modal-body {
    padding: 20px;
    direction: rtl;
    text-align: right;
}

.scc-modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    flex-wrap: wrap;
    direction: rtl;
}

/* RTL Modal Support */
.scc-rtl .scc-modal-content {
    direction: rtl;
}

.scc-rtl .scc-modal-footer {
    justify-content: flex-start;
}

/* Category Styles */
.scc-categories {
    margin: 20px 0;
}

.scc-category {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 5px;
    background: #f9f9f9;
    direction: rtl;
    text-align: right;
    transition: all 0.3s ease;
}

.scc-category:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.scc-category-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
    direction: rtl;
    flex-direction: row-reverse;
}

.scc-category-description {
    margin: 0;
    color: #666;
    font-size: 13px;
    line-height: 1.4;
    text-align: right;
}

.scc-required {
    color: #e74c3c;
    font-size: 12px;
    font-weight: normal;
}

/* Toggle Switch Styles */
.scc-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    cursor: pointer;
}

.scc-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.scc-toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.scc-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.scc-toggle input:checked + .scc-toggle-slider {
    background-color: #27ae60;
}

.scc-toggle input:checked + .scc-toggle-slider:before {
    transform: translateX(26px);
}

.scc-toggle input:focus + .scc-toggle-slider {
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.2);
}

.scc-toggle input:disabled + .scc-toggle-slider {
    background-color: #27ae60;
    opacity: 0.6;
    cursor: not-allowed;
}

/* RTL Toggle Support */
.scc-rtl .scc-toggle input:checked + .scc-toggle-slider:before {
    transform: translateX(-26px);
}

/* Settings Form Styles */
.scc-settings-form {
    max-width: 600px;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    direction: rtl;
    text-align: right;
}

.scc-settings-form h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: right;
}

.scc-form-buttons {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-start;
    direction: rtl;
}

.scc-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 5px;
    font-weight: 500;
    text-align: right;
    direction: rtl;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.scc-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.scc-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.scc-message[style*="block"] {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .scc-banner {
        min-height: 120px;
    }
    
    .scc-banner-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 15px;
    }
    
    .scc-banner-content.scc-buttons-right,
    .scc-banner-content.scc-buttons-left {
        flex-direction: column;
        align-items: center;
    }
    
    .scc-banner-content.scc-buttons-right .scc-banner-buttons,
    .scc-banner-content.scc-buttons-left .scc-banner-buttons {
        order: 1;
    }
    
    .scc-banner-text {
        min-width: auto;
        font-size: 13px;
    }
    
    .scc-banner-buttons {
        justify-content: center;
        width: 100%;
        gap: 8px;
    }
    
    .scc-btn {
        padding: 12px 16px;
        font-size: 14px;
        min-width: 100px;
        flex: 1;
        max-width: 120px;
    }
    
    .scc-modal {
        padding: 10px;
    }
    
    .scc-modal-content {
        max-height: 90vh;
        border-radius: 10px;
    }
    
    .scc-modal-header,
    .scc-modal-body,
    .scc-modal-footer {
        padding: 15px;
    }
    
    .scc-modal-footer {
        flex-direction: column;
    }
    
    .scc-modal-footer .scc-btn {
        width: 100%;
        margin: 0;
        max-width: none;
    }
    
    .scc-category-header {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .scc-form-buttons {
        flex-direction: column;
    }
    
    .scc-form-buttons .scc-btn {
        width: 100%;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .scc-banner-content {
        padding: 12px;
    }
    
    .scc-banner-text {
        font-size: 12px;
        line-height: 1.4;
    }
    
    .scc-btn {
        font-size: 13px;
        padding: 10px 12px;
    }
    
    .scc-banner-buttons {
        gap: 6px;
    }
}

/* Animation */
.scc-banner {
    animation: slideIn 0.5s ease-out;
}

.scc-banner-bottom,
.scc-banner-bottom-desktop,
.scc-banner-bottom-mobile {
    animation: slideInBottom 0.5s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInBottom {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.scc-modal {
    animation: fadeIn 0.3s ease-out;
}

.scc-modal-content {
    animation: slideInModal 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInModal {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .scc-banner {
        border: 2px solid #fff;
    }
    
    .scc-btn {
        border: 2px solid currentColor;
    }
    
    .scc-toggle-slider {
        border: 2px solid #333;
    }
    
    .scc-category {
        border: 2px solid #333;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .scc-banner,
    .scc-modal,
    .scc-modal-content,
    .scc-toggle-slider,
    .scc-toggle-slider:before,
    .scc-btn,
    .scc-category,
    .scc-close {
        animation: none;
        transition: none;
    }
}

/* Focus styles for accessibility */
.scc-btn:focus,
.scc-toggle:focus-within,
.scc-close:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .scc-banner,
    .scc-modal {
        display: none !important;
    }
}