/* ==========================================================================
   2A Mühendislik — KVKK Cookie Consent & Preference Center
   Brand Palette: #0099ff (Primary Blue), #004f9f (Corporate Navy),
                  #151515 (Ink), #f4f4f4 (Surface), Font: 'Exo 2', Arial
   ========================================================================== */

html.cm2a-no-scroll,
html.cm2a-no-scroll body {
    overflow: hidden !important;
}

/* Strict isolation from legacy global style.css rules (float:left on ul/li/input) */
#cm2a-root,
#cm2a-root *,
#cm2a-root *::before,
#cm2a-root *::after {
    box-sizing: border-box;
    font-family: 'Exo 2', Arial, sans-serif;
}

#cm2a-root ul,
#cm2a-root li,
#cm2a-root input,
#cm2a-root button,
#cm2a-root label,
#cm2a-root p,
#cm2a-root div,
#cm2a-root span,
#cm2a-root h2,
#cm2a-root h3,
#cm2a-root table,
#cm2a-root tr,
#cm2a-root th,
#cm2a-root td {
    float: none;
}

/* ---------- Bottom Cookie Banner ---------- */
.cm2a-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99990;
    background: #ffffff;
    border-top: 3px solid #0099ff;
    box-shadow: 0 -10px 35px rgba(0, 42, 92, 0.14);
    transform: translateY(115%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease, visibility 0.3s ease;
}

.cm2a-banner.cm2a-visible {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.cm2a-banner-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.cm2a-banner-content {
    flex: 1 1 auto;
    min-width: 0;
}

.cm2a-banner-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.cm2a-banner-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 153, 255, 0.12);
    color: #004f9f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cm2a-banner-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #151515;
    line-height: 1.3;
}

.cm2a-banner-text {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.55;
    color: #4a5568;
}

.cm2a-banner-text a {
    color: #004f9f;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

.cm2a-banner-text a:hover {
    color: #0099ff;
}

/* Equal-prominence KVKK compliant action buttons */
.cm2a-banner-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    flex-wrap: nowrap;
}

.cm2a-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 148px;
    height: 42px;
    padding: 0 18px;
    border-radius: 4px;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.01em;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.12s ease;
    border: 1.5px solid transparent;
    text-decoration: none;
}

.cm2a-btn:active {
    transform: translateY(1px);
}

.cm2a-btn:focus-visible {
    outline: 2px solid #0099ff;
    outline-offset: 2px;
}

/* Primary & Reject have equal visual prominence per KVKK guidance */
.cm2a-btn-primary {
    background-color: #004f9f;
    border-color: #004f9f;
    color: #ffffff;
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.16);
}

.cm2a-btn-primary:hover {
    background-color: #0099ff;
    border-color: #0099ff;
    color: #ffffff;
}

.cm2a-btn-reject {
    background-color: #004f9f;
    border-color: #004f9f;
    color: #ffffff;
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.16);
}

.cm2a-btn-reject:hover {
    background-color: #003a75;
    border-color: #003a75;
    color: #ffffff;
}

.cm2a-btn-outline {
    background-color: #ffffff;
    border-color: #004f9f;
    color: #004f9f;
}

.cm2a-btn-outline:hover {
    background-color: #f0f7ff;
    border-color: #0099ff;
    color: #004f9f;
}

/* ---------- Preference Center Modal ---------- */
.cm2a-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.cm2a-modal-backdrop.cm2a-open {
    opacity: 1;
    visibility: visible;
}

.cm2a-modal {
    width: 100%;
    max-width: 780px;
    max-height: 90vh;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 24px 60px rgba(0, 30, 68, 0.28);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(16px) scale(0.985);
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.cm2a-modal-backdrop.cm2a-open .cm2a-modal {
    transform: translateY(0) scale(1);
}

.cm2a-modal-header {
    padding: 18px 24px;
    background: linear-gradient(135deg, #004f9f 0%, #0077cc 60%, #0099ff 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-shrink: 0;
}

.cm2a-modal-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cm2a-modal-title {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.25;
}

.cm2a-modal-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.cm2a-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.cm2a-modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1 1 auto;
    background: #f8fafc;
}

.cm2a-modal-intro {
    margin: 0 0 16px 0;
    font-size: 13.5px;
    line-height: 1.6;
    color: #334155;
}

.cm2a-modal-intro a {
    color: #004f9f;
    font-weight: 600;
    text-decoration: underline;
}

.cm2a-consent-meta {
    display: none;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 14px;
    margin-bottom: 16px;
    background: #eef6ff;
    border: 1px solid #cce3ff;
    border-radius: 6px;
    font-size: 12.5px;
    color: #004f9f;
}

.cm2a-consent-meta strong {
    font-weight: 700;
}

/* Category Cards */
.cm2a-cat-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cm2a-cat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cm2a-cat-card:hover {
    border-color: #b8d8f8;
    box-shadow: 0 3px 12px rgba(0, 79, 159, 0.06);
}

.cm2a-cat-header {
    padding: 15px 18px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.cm2a-cat-info {
    flex: 1 1 auto;
}

.cm2a-cat-title {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 700;
    color: #151515;
}

.cm2a-cat-desc {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #4a5568;
}

.cm2a-cat-transfer {
    margin: 6px 0 0 0;
    font-size: 12px;
    line-height: 1.45;
    color: #64748b;
}

.cm2a-cat-transfer strong {
    color: #004f9f;
}

.cm2a-cat-control {
    flex-shrink: 0;
    padding-top: 2px;
}

.cm2a-badge-active {
    display: inline-block;
    padding: 5px 11px;
    border-radius: 20px;
    background: #e6f4ff;
    color: #004f9f;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

/* Accessible WAI-ARIA Toggle Switch (immune to legacy iCheck/checkbox plugins) */
#cm2a-root .cm2a-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    vertical-align: middle;
    -webkit-appearance: none;
    appearance: none;
}

#cm2a-root .cm2a-slider {
    position: absolute;
    inset: 0;
    background-color: #cbd5e1;
    border-radius: 26px;
    transition: background-color 0.22s ease;
    display: block;
}

#cm2a-root .cm2a-slider::before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: #ffffff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    transition: transform 0.22s ease;
}

#cm2a-root .cm2a-switch[aria-checked="true"] .cm2a-slider {
    background-color: #0099ff;
}

#cm2a-root .cm2a-switch[aria-checked="true"] .cm2a-slider::before {
    transform: translateX(22px);
}

#cm2a-root .cm2a-switch:focus-visible .cm2a-slider {
    box-shadow: 0 0 0 3px rgba(0, 153, 255, 0.35);
}

/* Accordion Details */
.cm2a-cat-footer {
    padding: 0 18px 12px 18px;
}

.cm2a-accordion-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    background: transparent;
    border: none;
    color: #004f9f;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
}

.cm2a-accordion-btn:hover {
    color: #0099ff;
}

.cm2a-accordion-chevron {
    transition: transform 0.2s ease;
}

.cm2a-accordion-btn[aria-expanded="true"] .cm2a-accordion-chevron {
    transform: rotate(180deg);
}

.cm2a-cookie-panel {
    display: none;
    border-top: 1px solid #edf2f7;
    background: #fcfdff;
    padding: 12px 18px 16px 18px;
    overflow-x: auto;
}

.cm2a-cookie-panel.cm2a-panel-open {
    display: block;
}

.cm2a-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
    text-align: left;
}

.cm2a-table th {
    padding: 8px 10px;
    background: #f1f5f9;
    color: #1e293b;
    font-weight: 700;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.cm2a-table td {
    padding: 8px 10px;
    color: #475569;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
    line-height: 1.45;
}

.cm2a-table tr:last-child td {
    border-bottom: none;
}

.cm2a-code {
    font-family: Consolas, Menlo, Monaco, monospace;
    font-size: 11.5px;
    background: #f1f5f9;
    color: #0f172a;
    padding: 2px 6px;
    border-radius: 3px;
    display: inline-block;
}

/* Modal Footer */
.cm2a-modal-footer {
    padding: 16px 24px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.cm2a-modal-footer-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Blocked Third-Party Content Placeholder (e.g., Social Embeds) */
.cm2a-blocked-box {
    padding: 28px 20px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    text-align: center;
    margin: 12px 0;
}

.cm2a-blocked-box h4 {
    margin: 0 0 8px 0;
    font-size: 15px;
    font-weight: 700;
    color: #151515;
}

.cm2a-blocked-box p {
    margin: 0 0 16px 0;
    font-size: 13px;
    line-height: 1.5;
    color: #4a5568;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .cm2a-banner-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 18px 18px;
    }

    .cm2a-banner-actions {
        justify-content: stretch;
        flex-wrap: wrap;
    }

    .cm2a-banner-actions .cm2a-btn {
        flex: 1 1 140px;
    }
}

@media (max-width: 600px) {
    .cm2a-modal-backdrop {
        padding: 10px;
    }

    .cm2a-modal {
        max-height: 94vh;
    }

    .cm2a-modal-header,
    .cm2a-modal-body,
    .cm2a-modal-footer {
        padding: 14px 16px;
    }

    .cm2a-modal-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .cm2a-modal-footer-right {
        flex-direction: column;
        align-items: stretch;
    }

    .cm2a-modal-footer .cm2a-btn {
        width: 100%;
    }

    .cm2a-cat-header {
        flex-direction: column;
        gap: 10px;
    }
}
