/**
 * Cookie Notice Styles - Entity SEO Theme
 *
 * @package Entity_SEO_Theme
 * @since 1.0.0
 */

/* Cookie Notice Banner */
.cookie-notice {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999999;
    background: linear-gradient(145deg, #0f2744 0%, #0a192f 100%);
    border-top: 3px solid transparent;
    border-image: linear-gradient(90deg, var(--es-neon-purple), var(--es-gradient-purple-start), var(--es-cyan)) 1;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5), 0 -2px 16px rgba(176, 38, 255, 0.15);
    backdrop-filter: blur(10px);
    animation: slideUp 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-notice-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.75rem 2rem;
}

.cookie-notice-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.cookie-notice-text {
    flex: 1;
    min-width: 300px;
}

.cookie-notice-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
    font-weight: 700;
    font-family: var(--es-font-heading);
    color: #ffffff;
    letter-spacing: -0.02em;
}

.cookie-icon {
    width: 26px;
    height: 26px;
    color: var(--es-neon-purple);
    flex-shrink: 0;
    filter: drop-shadow(0 0 8px rgba(176, 38, 255, 0.6));
    animation: iconPulse 3s ease-in-out infinite;
}

@keyframes iconPulse {

    0%,
    100% {
        filter: drop-shadow(0 0 8px rgba(176, 38, 255, 0.6));
    }

    50% {
        filter: drop-shadow(0 0 12px rgba(176, 38, 255, 0.8));
    }
}

.cookie-notice-description {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--es-text-slate);
    font-weight: 400;
}

.cookie-notice-privacy-link {
    color: var(--es-cyan);
    text-decoration: none;
    margin-left: 0.25rem;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
    position: relative;
}

.cookie-notice-privacy-link::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--es-cyan);
    transition: width 0.3s ease;
}

.cookie-notice-privacy-link:hover {
    color: var(--es-mint-green);
}

.cookie-notice-privacy-link:hover::after {
    width: 100%;
}

.cookie-notice-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.cookie-notice-btn {
    padding: 0.75rem 1.75rem;
    border: none;
    border-radius: var(--es-radius-md);
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: var(--es-font-heading);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    white-space: nowrap;
    letter-spacing: -0.01em;
    position: relative;
    overflow: hidden;
}

.cookie-notice-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.cookie-notice-btn:hover::before {
    width: 300px;
    height: 300px;
}

.cookie-notice-btn-accept {
    background: linear-gradient(135deg, var(--es-neon-purple), var(--es-gradient-purple-end));
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(176, 38, 255, 0.4);
    position: relative;
}

.cookie-notice-btn-accept:hover {
    background: linear-gradient(135deg, #9c27b0, #7b1fa2);
    box-shadow: 0 6px 20px rgba(176, 38, 255, 0.6);
    transform: translateY(-2px);
}

.cookie-notice-btn-accept:active {
    transform: translateY(0);
}

.cookie-notice-btn-reject {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
}

.cookie-notice-btn-reject:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--es-red);
    color: var(--es-red);
    transform: translateY(-2px);
}

.cookie-notice-btn-settings {
    background: transparent;
    color: var(--es-cyan);
    border: 1px solid var(--es-cyan);
}

.cookie-notice-btn-settings:hover {
    background: rgba(6, 182, 212, 0.1);
    border-color: var(--es-mint-green);
    color: var(--es-mint-green);
    transform: translateY(-2px);
}

/* Cookie Settings Modal */
.cookie-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.cookie-settings-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.cookie-settings-content {
    position: relative;
    background: linear-gradient(145deg, #0f2744 0%, #0a192f 100%);
    border: 1px solid rgba(176, 38, 255, 0.2);
    border-radius: var(--es-radius-lg);
    max-width: 750px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(176, 38, 255, 0.1);
    animation: modalSlideIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.9) translateY(30px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.cookie-settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.75rem 2rem;
    border-bottom: 1px solid rgba(176, 38, 255, 0.15);
    background: linear-gradient(90deg,
            rgba(176, 38, 255, 0.08) 0%,
            rgba(139, 92, 246, 0.05) 50%,
            rgba(6, 182, 212, 0.08) 100%);
    position: relative;
}

.cookie-settings-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--es-neon-purple), var(--es-gradient-purple-start), var(--es-cyan));
    opacity: 0.5;
}

.cookie-settings-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--es-font-heading);
    color: #ffffff;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--es-neon-purple), var(--es-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cookie-settings-close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--es-radius-sm);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--es-text-slate);
}

.cookie-settings-close:hover {
    background: rgba(255, 77, 77, 0.15);
    border-color: var(--es-red);
    color: var(--es-red);
    transform: rotate(90deg);
}

.cookie-settings-close svg {
    width: 20px;
    height: 20px;
}

.cookie-settings-body {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

/* Custom scrollbar dla modala */
.cookie-settings-body::-webkit-scrollbar {
    width: 8px;
}

.cookie-settings-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.cookie-settings-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--es-neon-purple), var(--es-gradient-purple-end));
    border-radius: 4px;
}

.cookie-settings-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--es-gradient-purple-end), var(--es-neon-purple));
}

.cookie-settings-description {
    margin: 0 0 2rem 0;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--es-text-slate);
}

.cookie-category {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--es-radius-md);
    border: 1px solid rgba(176, 38, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cookie-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--es-neon-purple), var(--es-cyan));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cookie-category:hover {
    border-color: rgba(176, 38, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 15px rgba(176, 38, 255, 0.1);
}

.cookie-category:hover::before {
    opacity: 1;
}

.cookie-category-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
    margin-top: 2px;
}

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

.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-radius: 28px;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: linear-gradient(135deg, #ffffff, #e0e0e0);
    transition: 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.cookie-toggle input:checked+.cookie-toggle-slider {
    background: linear-gradient(135deg, var(--es-neon-purple), var(--es-gradient-purple-end));
    border-color: var(--es-neon-purple);
    box-shadow: 0 0 10px rgba(176, 38, 255, 0.5);
}

.cookie-toggle input:checked+.cookie-toggle-slider:before {
    transform: translateX(24px);
    background: linear-gradient(135deg, #ffffff, #f0f0f0);
}

.cookie-toggle input:disabled+.cookie-toggle-slider {
    cursor: not-allowed;
    opacity: 0.5;
    background: rgba(176, 38, 255, 0.3);
    border-color: rgba(176, 38, 255, 0.4);
}

.cookie-category-info {
    flex: 1;
}

.cookie-category-info h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.0625rem;
    font-weight: 600;
    font-family: var(--es-font-heading);
    color: #ffffff;
    letter-spacing: -0.01em;
}

.cookie-category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(176, 38, 255, 0.15);
    color: var(--es-neon-purple);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--es-radius-full);
    margin-top: 0.25rem;
    border: 1px solid rgba(176, 38, 255, 0.3);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.cookie-category-description {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--es-text-slate);
}

.cookie-settings-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid rgba(176, 38, 255, 0.15);
    background: rgba(0, 0, 0, 0.2);
    flex-wrap: wrap;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-notice-container {
        padding: 1.5rem 1.5rem;
    }

    .cookie-notice-content {
        gap: 1.5rem;
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-notice-text {
        min-width: 100%;
        text-align: center;
    }

    .cookie-notice-title {
        justify-content: center;
        font-size: 1.125rem;
    }

    .cookie-notice-description {
        font-size: 0.9375rem;
        text-align: center;
    }

    .cookie-notice-actions {
        width: 100%;
        justify-content: center;
        flex-direction: column;
    }

    .cookie-notice-btn {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .cookie-settings-content {
        max-height: 95vh;
        margin: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }

    .cookie-settings-header {
        padding: 1.25rem 1.5rem;
        flex-shrink: 0;
    }

    .cookie-settings-header h2 {
        font-size: 1.125rem;
    }

    .cookie-settings-body {
        padding: 1.5rem;
        flex: 1;
        overflow-y: auto;
    }

    .cookie-settings-footer {
        padding: 1.25rem 1.5rem;
        flex-direction: column;
        flex-shrink: 0;
        background: #0f2744;
        /* Solid background for footer on mobile */
        border-top: 1px solid rgba(176, 38, 255, 0.2);
    }

    .cookie-settings-footer .cookie-notice-btn {
        width: 100%;
        margin: 0;
    }

    .cookie-category {
        padding: 1.25rem;
    }
}

@media (max-width: 480px) {
    .cookie-notice-container {
        padding: 1.25rem 1rem;
    }

    .cookie-notice-title {
        font-size: 1rem;
    }

    .cookie-notice-description {
        font-size: 0.875rem;
    }

    .cookie-notice-actions {
        gap: 0.75rem;
    }

    .cookie-notice-btn {
        padding: 0.875rem;
        font-size: 0.9375rem;
    }

    .cookie-settings-header {
        padding: 1rem;
    }

    .cookie-settings-body {
        padding: 1rem;
    }

    .cookie-category-header {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .cookie-toggle {
        order: 2;
    }

    .cookie-category-info {
        width: 100%;
        order: 1;
    }

    .cookie-category-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .cookie-icon {
        width: 22px;
        height: 22px;
    }

    /* Adjust reopen button for mobile */
    .cookie-settings-reopen-btn {
        bottom: 15px;
        left: 15px;
        padding: 10px 14px;
    }

    .cookie-settings-reopen-text {
        display: none;
        /* Hide text on very small screens to save space */
    }

    .cookie-settings-reopen-btn svg {
        margin: 0;
    }
}

/* Accessibility */
.cookie-notice-btn:focus,
.cookie-settings-close:focus {
    outline: 2px solid var(--es-neon-purple);
    outline-offset: 2px;
}

.cookie-toggle input:focus+.cookie-toggle-slider {
    box-shadow: 0 0 0 2px var(--es-neon-purple);
}

/* Print styles */
@media print {

    .cookie-notice,
    .cookie-settings-modal {
        display: none !important;
    }
}

/* Animation for hiding */
.cookie-notice.hiding {
    animation: slideDown 0.4s ease-out forwards;
}

@keyframes slideDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }

    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

.cookie-settings-modal.hiding .cookie-settings-overlay {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

.cookie-settings-modal.hiding .cookie-settings-content {
    animation: modalSlideOut 0.3s ease forwards;
}

@keyframes modalSlideOut {
    from {
        transform: scale(1) translateY(0);
        opacity: 1;
    }

    to {
        transform: scale(0.9) translateY(30px);
        opacity: 0;
    }
}

/* Glow effect on hover for accept button */
.cookie-notice-btn-accept::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent,
            rgba(255, 255, 255, 0.1),
            transparent);
    transform: rotate(45deg);
    transition: all 0.5s;
}

.cookie-notice-btn-accept:hover::after {
    left: 100%;
}

/* ========================================
   Cookie Settings Reopen Button (Bottom Left)
   ======================================== */
.cookie-settings-reopen-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 99998;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(145deg, #0f2744 0%, #0a192f 100%);
    border: 1px solid rgba(176, 38, 255, 0.3);
    border-radius: 50px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--es-font-heading);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 15px rgba(176, 38, 255, 0.15);
    backdrop-filter: blur(10px);
}

.cookie-settings-reopen-btn svg {
    width: 20px;
    height: 20px;
    color: var(--es-neon-purple);
    transition: all 0.3s ease;
    flex-shrink: 0;
    filter: drop-shadow(0 0 6px rgba(176, 38, 255, 0.5));
}

.cookie-settings-reopen-text {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cookie-settings-reopen-btn:hover {
    background: linear-gradient(145deg, #142d4c 0%, #0d1f35 100%);
    border-color: var(--es-neon-purple);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 0 25px rgba(176, 38, 255, 0.3);
}

.cookie-settings-reopen-btn:hover svg {
    color: var(--es-cyan);
    filter: drop-shadow(0 0 10px rgba(6, 182, 212, 0.7));
    animation: cookieIconSpin 0.6s ease;
}

.cookie-settings-reopen-btn:hover .cookie-settings-reopen-text {
    color: #ffffff;
}

@keyframes cookieIconSpin {
    0% {
        transform: rotate(0deg);
    }

    50% {
        transform: rotate(15deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

.cookie-settings-reopen-btn:focus {
    outline: 2px solid var(--es-neon-purple);
    outline-offset: 2px;
}

.cookie-settings-reopen-btn:active {
    transform: translateY(-1px) scale(1);
}

/* Pulse animation for cookie button to draw attention */
.cookie-settings-reopen-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50px;
    background: transparent;
    border: 2px solid rgba(176, 38, 255, 0.4);
    transform: translate(-50%, -50%);
    animation: cookiePulse 3s ease-out infinite;
    pointer-events: none;
}

@keyframes cookiePulse {
    0% {
        width: 100%;
        height: 100%;
        opacity: 0.6;
    }

    100% {
        width: 140%;
        height: 140%;
        opacity: 0;
    }
}

/* Minimized version - only icon */
.cookie-settings-reopen-btn.minimized {
    padding: 12px;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    justify-content: center;
}

.cookie-settings-reopen-btn.minimized .cookie-settings-reopen-text {
    display: none;
}

.cookie-settings-reopen-btn.minimized svg {
    width: 22px;
    height: 22px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .cookie-settings-reopen-btn {
        bottom: 15px;
        left: 15px;
        padding: 10px 14px;
        font-size: 12px;
    }

    .cookie-settings-reopen-btn svg {
        width: 18px;
        height: 18px;
    }

    .cookie-settings-reopen-text {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .cookie-settings-reopen-btn {
        bottom: 12px;
        left: 12px;
        padding: 10px;
        border-radius: 50%;
        width: 44px;
        height: 44px;
        justify-content: center;
    }

    .cookie-settings-reopen-btn .cookie-settings-reopen-text {
        display: none;
    }

    .cookie-settings-reopen-btn svg {
        width: 20px;
        height: 20px;
    }
}

/* Animation for showing the button */
.cookie-settings-reopen-btn.visible {
    animation: fadeInUp 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hide only when cookie notice banner is actively visible */
.cookie-notice.visible~.cookie-settings-reopen-btn {
    opacity: 0;
    pointer-events: none;
}

/* Print styles */
@media print {
    .cookie-settings-reopen-btn {
        display: none !important;
    }
}