/* ========================================
   COMPONENTS - Tüm sayfalarda kullanılan ortak bileşenler
   ======================================== */

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--neon-blue), #0099cc);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.6);
}

.scroll-to-top svg {
    width: 24px;
    height: 24px;
    stroke: var(--bg-primary);
    stroke-width: 2.5;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 20px;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.4s ease;
    box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.3);
}

.cookie-banner.visible {
    transform: translateY(0);
}

.cookie-banner.hidden {
    transform: translateY(100%);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
}

.cookie-text {
    flex: 1;
    min-width: 300px;
}

.cookie-text h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cookie-text h4 svg {
    stroke: var(--neon-blue);
}

.cookie-text p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.cookie-text a {
    color: var(--neon-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

.cookie-text a:hover {
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    white-space: nowrap;
}

.cookie-btn-accept {
    background: linear-gradient(135deg, var(--neon-blue), #0099cc);
    color: var(--bg-primary);
}

.cookie-btn-accept:hover {
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.4);
    transform: translateY(-2px);
}

.cookie-btn-settings {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.cookie-btn-settings:hover {
    border-color: var(--neon-blue);
    color: var(--neon-blue);
}

.cookie-btn-reject {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.cookie-btn-reject:hover {
    border-color: #ff4444;
    color: #ff4444;
}

/* Cookie Settings Modal */
.cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cookie-modal.active {
    display: flex;
}

.cookie-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.cookie-modal-content {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 2001;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.cookie-modal-header {
    padding: 25px 30px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.cookie-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.cookie-modal-close svg {
    stroke: var(--text-secondary);
    width: 24px;
    height: 24px;
}

.cookie-modal-close:hover {
    transform: rotate(90deg);
}

.cookie-modal-close:hover svg {
    stroke: var(--neon-blue);
}

.cookie-modal-body {
    padding: 30px;
}

.cookie-category {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}

.cookie-category:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.cookie-category-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.cookie-category p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 26px;
    transition: all 0.3s ease;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 3px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--neon-blue);
    border-color: var(--neon-blue);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(22px);
    background: var(--bg-primary);
}

.toggle-switch input:disabled + .toggle-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

.cookie-modal-footer {
    padding: 20px 30px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    .cookie-content {
        flex-direction: column;
        text-align: center;
    }

    .cookie-text {
        min-width: auto;
    }

    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }

    .cookie-btn {
        flex: 1;
        min-width: 100px;
    }

    .cookie-modal-content {
        margin: 10px;
        max-height: 90vh;
    }

    .cookie-modal-header,
    .cookie-modal-body,
    .cookie-modal-footer {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .cookie-buttons {
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
    }

    .cookie-modal-footer {
        flex-direction: column;
    }

    .cookie-modal-footer .cookie-btn {
        width: 100%;
    }
}
