﻿

/* Cookie Banner Container */
#privacyModal {
    display: flex;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 400px;
    max-width: calc(100vw - 40px);
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(150%);
    transition: transform 0.4s ease-in-out;
    z-index: 1000;
    max-height: calc(100vh - 40px);
    overflow-y: auto;

    &.show {
        transform: translateY(0);
    }
    /* Common Styles */
    .cookie-panel {
        padding: 16px;
        display: flex;
        flex-direction: column;
        gap: 12px;


        .cookie-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .cookie-header-content {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .featured-icon {
            width: 48px;
            height: 48px;
            border-radius: 50%;
            background: #EFF6FF;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .cookie-icon {
            width: 24px;
            height: 24px;
        }

        .cookie-title {
            color: #1F2A37;
            font-size: 18px;
            font-weight: 600;
            line-height: 28px;
        }

        .btn {
            width: 100%;
            /*    padding: 10px 16px;*/
            border-radius: 8px;
            font-size: 16px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
            border: none;
            text-align: center;
        }


        .close-btn {
            width: 40px;
            height: 40px;
            border: none;
            background: transparent;
            cursor: pointer;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.2s;
        }

            .close-btn:hover {
                background: #F3F4F6;
            }

        .close-icon {
            width: 20px;
            height: 20px;
        }

        .cookie-text {
            color: #384250;
            font-size: 16px;
            font-weight: 400;
            line-height: 24px;
        }

        .privacy-link {
            color: #3B82F6;
            font-size: 16px;
            font-weight: 500;
            text-decoration: none;
            display: inline-block;
            margin-top: 8px;
        }

            .privacy-link:hover {
                text-decoration: underline;
            }
        /* Buttons */
        .btn-group {
            display: flex;
            flex-direction: column;
            gap: 8px;
            width: 100%;
        }



        .btn-primary {
            background: #3B82F6;
            color: white;
        }

            .btn-primary:hover {
                background: #2563EB;
            }

        .btn-secondary {
            background: white;
            color: #374151;
            border: 1px solid #D1D5DB;
        }

            .btn-secondary:hover {
                background: #F9FAFB;
                border-color: #9CA3AF;
            }
        /* Cookie Settings Switches */
        .switch-container {
            display: flex;
            flex-direction: column;
            gap: 12px;
            margin: 8px 0;
        }

        .switch-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px;
            background: #F9FAFB;
            border-radius: 8px;
            border: 1px solid #E5E7EB;
            cursor: pointer
        }

            .switch-item.disabled {
                opacity: 0.6;
            }

        .switch-label {
            color: #374151;
            font-size: 14px;
            font-weight: 500;
            flex: 1;
        }
        /* Toggle Switch */
        .toggle-switch {
            position: relative;
            width: 44px;
            height: 24px;
            margin-right: 12px;
        }

            .toggle-switch input {
                opacity: 0;
                width: 0;
                height: 0;
            }

        .toggle-slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #E5E7EB;
            transition: 0.3s;
            border-radius: 24px;
        }

            .toggle-slider:before {
                position: absolute;
                content: "";
                height: 18px;
                width: 18px;
                left: 3px;
                bottom: 3px;
                background-color: white;
                transition: 0.3s;
                border-radius: 50%;
            }

        input:checked + .toggle-slider {
            /*    background-color: #3B82F6;*/
            background-color: #1b8354;
        }

            input:checked + .toggle-slider:before {
                transform: translateX(20px);
            }

        input:disabled + .toggle-slider {
            cursor: not-allowed;
            /*    background-color: #3B82F6;*/
            background-color: #1b8354;
        }
        /* Hidden panels */
        .hidden {
            display: none !important;
        }
        






        .switch-item:hover .toggle-slider {
            background-color: var(--colors-brand-900);
            outline: 4px solid var(--controls-control-ripple-effect);
        }

        .switch-item:hover input:checked + .toggle-slider {
            background-color: var(--controls-control-primary-hovered);
            outline: 4px solid var(--controls-control-ripple-effect);
        }

        .switch-item input:hover + .toggle-slider:before {
            background-color: var(--controls-control-neutral-hovered);
        }
    }
}
@media (max-width: 480px) {
    #privacyModal {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 12px 12px 0 0;
    }
}

/* Float Button */
#cookieFloat {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #1F2937;
    color: white;
    border: none;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
    z-index: 999;

    &:hover {
        background-color: #374151;
        transform: scale(1.05);
    }

    &.show {
        display: flex;
    }

    .float-icon {
        width: 24px;
        height: 24px;
    }
}



[dir=rtl] {
    #privacyModal {
        left: 20px;
        right: initial;


        .cookie-panel {
            .toggle-slider:before {
                left: initial;
                right: 3px;
            }

            input:checked + .toggle-slider:before {
                transform: translateX(-20px);
            }
        }
    }

    #cookieFloat {
        left: 20px;
        right: initial;
    }
}