/* GDPR/KVKK Cookie Consent System Styles */

/* CSS Variables - Brand Colors */
:root {
  --as-brand1: #ff2a2a;
  --as-brand2: #b30000;
  --as-bg: rgba(16,16,19,.86);
  --as-bg2: rgba(20,20,24,.74);
  --as-text: #fff;
  --as-muted: #cfd3dd;
  --as-border: rgba(255,255,255,.10);
  --as-border2: rgba(255,255,255,.08);
  
  /* Nebula Settings */
  --nebula-dur: 18s;
  --nebula-blur: 38px;
  --nebula-sat: 1.25;
}

/* Reset and base styles */


.hidden {
    display: none !important;
}

/* Cookie Consent Popup - Bottom Static */
.cookie-consent {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.cookie-consent.hidden { 
    display: none; 
}

.cookie-consent:not(.hidden) { 
    display: block; 
    animation: cookieSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cookieSlideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-consent-content {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    border-radius: 0;
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    background: 
        linear-gradient(180deg, var(--as-bg), var(--as-bg2));
    border: none;
    border-top: 1px solid var(--as-border);
    box-shadow: 
        0 -10px 50px rgba(0,0,0,0.4),
        0 -25px 50px -12px rgba(0,0,0,0.85),
        inset 0 1px 0 rgba(255,255,255,0.1);
}

/* Cookie Background - Siyah Glass Effect */
.cookie-consent-content::before {
    content: "";
    position: absolute;
    inset: -60% -40% -40% -40%;
    filter: blur(calc(var(--nebula-blur) * 0.6));
    opacity: .4;
    will-change: transform;
    background:
        radial-gradient(60% 50% at 20% 25%, rgba(255,255,255,.08), transparent 60%),
        radial-gradient(55% 45% at 80% 30%, rgba(120,120,120,.12), transparent 60%),
        radial-gradient(70% 60% at 50% 80%, rgba(255,255,255,.05), transparent 60%),
        radial-gradient(50% 50% at 60% 55%, rgba(0,0,0,.15), transparent 70%);
    animation: nebulaDriftXY var(--nebula-dur) ease-in-out infinite alternate;
    border-radius: inherit;
    pointer-events: none;
}

.cookie-consent-content::after {
    content: "";
    position: absolute;
    inset: -65% -45% -45% -45%;
    filter: blur(calc(var(--nebula-blur) * 0.8));
    opacity: .3;
    will-change: transform;
    background:
        radial-gradient(60% 50% at 15% 65%, rgba(80,80,80,.18), transparent 62%),
        radial-gradient(55% 50% at 85% 70%, rgba(255,255,255,.06), transparent 60%),
        radial-gradient(40% 40% at 50% 40%, rgba(0,0,0,.12), transparent 65%);
    animation: nebulaDriftXY calc(var(--nebula-dur) * 1.4) ease-in-out infinite alternate-reverse;
    border-radius: inherit;
    pointer-events: none;
}

/* Nebula Animation */
@keyframes nebulaDriftXY {
    0%   { transform: translate(-2%, -1%) rotate(0deg) scale(1.02); }
    25%  { transform: translate(1%, -2%) rotate(1deg) scale(0.98); }
    50%  { transform: translate(-1%, 1%) rotate(-1deg) scale(1.01); }
    75%  { transform: translate(2%, -1%) rotate(2deg) scale(0.99); }
    100% { transform: translate(-1%, 2%) rotate(-0.5deg) scale(1.02); }
}


.cookie-header {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px 24px 0;
    margin-bottom: 0;
}

.cookie-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--as-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-close {
    background: transparent;
    border: none;
    color: #ccc;
    font-size: 28px;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.cookie-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.cookie-body {
    position: relative;
    z-index: 1;
    padding: 16px 24px;
    line-height: 1.6;
    text-align: center;
}

.cookie-body p {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: var(--as-muted);
    font-weight: 500;
}

.cookie-link {
    color: var(--as-brand1);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.cookie-link:hover {
    color: var(--as-brand2);
}

.cookie-buttons {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

/* Button Styles - Confirm Style */
.btn {
    padding: 12px 18px;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    white-space: nowrap;

    background: rgba(255,255,255,.05);
    color: var(--as-text);
    border: 1px solid var(--as-border2);
}

.btn:hover {
    background: rgba(255,255,255,.10);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-accept {
    background: linear-gradient(90deg, var(--as-brand1), var(--as-brand2));
    color: var(--as-text);
    border: 1px solid transparent;
    box-shadow: 0 2px 8px rgba(255,42,42, 0.3);
}

.btn-accept:hover {
    background: linear-gradient(90deg, #ff2a2a, #cc0000);
    box-shadow: 0 4px 12px rgba(255,42,42, 0.4);
}

.btn-reject {
    background: rgba(255,255,255,.05);
    color: var(--as-muted);
    border: 1px solid var(--as-border2);
}

.btn-customize {
    background: rgba(255,255,255,.05);
    color: var(--as-muted);
    border: 1px solid var(--as-border2);
}

/* Normal cookies popup'ta timer yok - timer'ı kaldırıldı */

/* Cookie Settings Modal */
.cookie-settings {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.cookie-settings-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.cookie-settings-content {
    position: relative;
    background: linear-gradient(180deg, var(--as-bg), var(--as-bg2));
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid var(--as-border);
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 
        0 0 50px rgba(0,0,0,0.4),
        0 20px 60px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255,255,255,0.1);
    animation: modalSlideIn 0.4s ease-out;
}

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

.settings-header {
    padding: 24px 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    margin-bottom: 24px;
}

.settings-header h3 {
    margin: 0;
    font-size: 24px;
    color: var(--as-text);
    padding-bottom: 16px;
}

.settings-close {
    background: transparent;
    border: none;
    font-size: 28px;
    color: var(--as-muted);
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.settings-close:hover {
    background: rgba(255,255,255,.10);
    color: var(--as-text);
}

.settings-body {
    padding: 0 24px 24px;
}

/* Cookie Categories */
.cookie-category {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f0f0f0;
}

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

.category-header {
    margin-bottom: 12px;
}

.category-description {
    color: var(--as-muted);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    margin-left: 56px;
}

/* Switch/Toggle Styles */
.switch-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    color: var(--as-text);
    gap: 16px;
}

.switch-label.disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.cookie-checkbox {
    display: none;
}

.switch {
    position: relative;
    width: 50px;
    height: 26px;
    background: #ccc;
    border-radius: 26px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.switch.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cookie-checkbox:checked + .switch {
    background: linear-gradient(90deg, var(--as-brand1), var(--as-brand2));
}

.cookie-checkbox:checked + .switch .slider {
    transform: translateX(24px);
}

.switch:hover:not(.disabled) {
    box-shadow: 0 0 0 3px rgba(255, 42, 42, 0.1);
}

/* Settings Footer */
.settings-footer {
    padding: 24px;
    background: rgba(255,255,255,.02);
    border-top: 1px solid var(--as-border2);
    border-radius: 0 0 16px 16px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-save {
    background: linear-gradient(90deg, var(--as-brand1), var(--as-brand2));
    color: var(--as-text);
    flex: 1;
    min-width: 180px;
    border: 1px solid transparent;
}

.btn-save:hover {
    background: linear-gradient(90deg, #ff2a2a, #cc0000);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 42, 42, 0.4);
}

.btn-accept-all {
    background: rgba(255,255,255,.05);
    color: var(--as-muted);
    border: 1px solid var(--as-border2);
    flex: 1;
    min-width: 180px;
}

.btn-accept-all:hover {
    background: rgba(255,255,255,.10);
    color: var(--as-text);
    transform: translateY(-2px);
}

/* Cookie Success Popup - Top with Timer */
.cookie-success-popup {
    position: fixed;
    left: 50%;
    top: 28px;
    transform: translate(-50%, -16px) scale(.98);
    width: min(480px, 92vw);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    background: linear-gradient(135deg, rgba(39, 209, 122, 0.95) 0%, rgba(22, 160, 91, 0.98) 100%);
    color: white;
    padding: 0;
    box-shadow: 
        0 25px 50px -12px rgba(0,0,0,0.85),
        0 0 0 1px rgba(255,255,255,0.1),
        inset 0 1px 0 rgba(255,255,255,0.2);
    z-index: 10002;
    animation: successSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    overflow: hidden;
}

@keyframes successSlideIn {
    from {
        transform: translate(-50%, -40px) scale(.95);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -16px) scale(.98);
        opacity: 1;
    }
}

/* Success popup timer bar */
.cookie-success-popup::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0.8), rgba(255,255,255,0.6));
    transform-origin: left center;
    border-radius: 0 0 20px 20px;
    animation: successTimerProgress 3s linear forwards;
    z-index: 1;
}

@keyframes successTimerProgress {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

/* Legacy consent banner class for backward compatibility */
.consent-banner {
    position: fixed;
    left: 50%;
    top: 28px;
    transform: translate(-50%, -16px) scale(.98);
    width: min(480px, 92vw);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    background: linear-gradient(135deg, rgba(39, 209, 122, 0.95) 0%, rgba(22, 160, 91, 0.98) 100%);
    color: white;
    padding: 0;
    box-shadow: 
        0 25px 50px -12px rgba(0,0,0,0.85),
        0 0 0 1px rgba(255,255,255,0.1),
        inset 0 1px 0 rgba(255,255,255,0.2);
    z-index: 10002;
    animation: successSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    overflow: hidden;
}

.consent-banner::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0.8), rgba(255,255,255,0.6));
    transform-origin: left center;
    border-radius: 0 0 20px 20px;
    animation: successTimerProgress 3s linear forwards;
    z-index: 1;
}

.banner-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 20px;
}

.banner-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

.banner-icon {
    font-size: 18px;
    color: white;
    flex-shrink: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-consent-content {
        padding: 20px 16px;
    }
    
    .cookie-header h3 {
        font-size: 20px;
    }
    
    .cookie-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn {
        width: 100%;
        min-width: unset;
    }
    
    .cookie-settings-content {
        width: 95%;
        margin: 10px;
    }
    
    .settings-header,
    .settings-body,
    .settings-footer {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .category-description {
        margin-left: 0;
        margin-top: 8px;
    }
    
    .switch-label {
        font-size: 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .settings-footer {
        flex-direction: column;
    }
    
    /* Success popup responsive */
    .cookie-success-popup,
    .consent-banner {
        top: 10px;
        width: calc(100% - 20px);
        left: 10px;
        right: 10px;
        transform: translateX(0) scale(.98);
    }
    
    .cookie-success-popup::after,
    .consent-banner::after {
        border-radius: 0 0 16px 16px;
    }
}

@media (max-width: 480px) {
    .cookie-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .cookie-close {
        align-self: flex-end;
    }
    
    .cookie-body p {
        font-size: 14px;
    }
    
    .switch-label {
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }
    
    .category-description {
        margin-left: 46px;
    }
}

/* Print styles */
@media print {
    .cookie-consent,
    .cookie-settings,
    .consent-banner {
        display: none !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .cookie-consent {
        background: black;
        border-top-color: yellow;
    }
    
    .btn-accept {
        background: #ff0000;
    }
    
    .btn-reject {
        background: #000000;
        border-color: #ffffff;
    }
    
    .switch {
        border: 2px solid #000000;
    }
    
    .cookie-checkbox:checked + .switch {
        background: #ff0000;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .cookie-consent,
    .cookie-settings,
    .consent-banner {
        animation: none;
    }
    
    .btn,
    .switch,
    .slider {
        transition: none;
    }
}

/* Focus styles for accessibility */
.btn:focus,
.cookie-close:focus,
.settings-close:focus {
    outline: 3px solid rgba(225, 29, 46, 0.5);
    outline-offset: 2px;
}

.switch-label:focus-within .switch {
    box-shadow: 0 0 0 3px rgba(225, 29, 46, 0.3);
}
.cookie-info {
  font-size: 14px;
  color: #ddd;
  margin-top: 16px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 10px;
}

.cookie-info .cookie-icon svg {
  filter: drop-shadow(0 0 6px rgba(225,29,46,0.6));
}

.cookie-info .cookie-link {
  color: #ff2a2a;
  font-weight: 700;
  text-decoration: none;
  position: relative;
  transition: color 0.25s ease;
}

.cookie-info .cookie-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #ff0000, #cc0000);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.cookie-info .cookie-link:hover {
  color: #fff;
}

.cookie-info .cookie-link:hover::after {
  transform: scaleX(1);
}