/* YKKD Consent Manager v2.0 */

#ykkd-consent-panel,
#ykkd-consent-trigger {
    --yc-primary: #2956F8;
    --yc-text: #222222;
    --yc-border: #e2e5eb;
    font-family: Arial, sans-serif;
    box-sizing: border-box;
}

#ykkd-consent-panel *,
#ykkd-consent-trigger * {
    box-sizing: border-box;
}

#ykkd-consent-panel[hidden],
#ykkd-consent-trigger[hidden] {
    display: none !important;
}

#ykkd-consent-panel {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 460px;
    max-width: calc(100vw - 48px);
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    z-index: 2147483000;
    background: #ffffff;
    color: var(--yc-text);
    border: 1px solid var(--yc-border);
    border-top: 5px solid var(--yc-primary);
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0,0,0,.18);
    padding: 24px;
    font-size: 14px;
    line-height: 1.5;
}

.ykkd-consent-title {
    font-size: 21px;
    font-weight: 700;
    color: var(--yc-primary);
    margin: 0 0 12px;
}

.ykkd-consent-description {
    font-size: 14px;
    color: #555;
    margin: 0 0 16px;
}

.ykkd-consent-category {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 0;
    border-top: 1px solid var(--yc-border);
}

.ykkd-consent-category strong {
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
}

.ykkd-consent-category small {
    display: block;
    color: #666;
    font-size: 12px;
    line-height: 1.5;
}

.ykkd-consent-required {
    color: #287545;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.ykkd-consent-switch {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    width: 44px;
    height: 25px;
    min-width: 44px;
    margin: 0;
    background: #969ba5;
    border: 0;
    border-radius: 20px;
    cursor: pointer;
    transition: background .2s;
}

.ykkd-consent-switch::before {
    content: "";
    position: absolute;
    width: 19px;
    height: 19px;
    top: 3px;
    left: 3px;
    border-radius: 50%;
    background: #fff;
    transition: transform .2s;
}

.ykkd-consent-switch:checked {
    background: var(--yc-primary);
}

.ykkd-consent-switch:checked::before {
    transform: translateX(19px);
}

.ykkd-consent-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 18px;
}

.ykkd-consent-button {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 10px;
    border: 1px solid var(--yc-primary);
    border-radius: 6px;
    background: #fff;
    color: var(--yc-primary);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    cursor: pointer;
}

.ykkd-consent-button:hover {
    background: #f0f3ff;
}

.ykkd-consent-save {
    grid-column: 1 / -1;
    background: var(--yc-primary);
    color: #fff;
}

.ykkd-consent-save:hover {
    background: #2046d8;
}

.ykkd-consent-policy {
    display: block;
    text-align: center;
    margin-top: 14px;
    color: #555;
    font-size: 12px;
    text-decoration: underline;
}

#ykkd-consent-trigger {
    position: fixed;
    bottom: 16px;
    left: 16px;
    z-index: 2147482999;
    padding: 10px 16px;
    border: 0;
    border-radius: 6px;
    background: var(--yc-primary);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(0,0,0,.15);
}

#ykkd-consent-panel :focus-visible,
#ykkd-consent-trigger:focus-visible {
    outline: 3px solid #e6a700;
    outline-offset: 3px;
}

@media (max-width: 600px) {
    #ykkd-consent-panel {
        bottom: 12px;
        right: 12px;
        left: 12px;
        width: auto;
        max-width: none;
        max-height: calc(100dvh - 24px);
        padding: 18px;
    }

    .ykkd-consent-title {
        font-size: 19px;
    }

    #ykkd-consent-trigger {
        bottom: 10px;
        left: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ykkd-consent-switch,
    .ykkd-consent-switch::before {
        transition: none;
    }
}
