/**
 * Nosta&Mira CMP Stylesheet
 * Responsive, accessible, botanical luxury aesthetic
 */

/* Banner */
.nosta-cmp-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 1180px;
    margin: 0 auto;
    background: #fdfcf9;
    border: 1px solid var(--line, #ded8cd);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(48, 46, 40, 0.14);
    z-index: 99990;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.38s cubic-bezier(0.22, 1, 0.36, 1), transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}
.nosta-cmp-banner.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.nosta-cmp-banner-inner {
    padding: 24px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}
.nosta-cmp-banner-text {
    flex: 1 1 auto;
    max-width: 760px;
}
.nosta-cmp-eyebrow {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    color: var(--gold, #ac9372);
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}
.nosta-cmp-leaf {
    font-size: 0.9rem;
    color: var(--olive, #60624d);
}
.nosta-cmp-banner-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--ink, #302e28);
    margin: 0 0 8px 0;
    line-height: 1.3;
}
.nosta-cmp-banner-desc {
    font-size: 0.86rem;
    line-height: 1.6;
    color: var(--muted, #7c776f);
    margin: 0;
}
.nosta-cmp-banner-desc a {
    color: var(--olive, #60624d);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
}
.nosta-cmp-banner-desc a:hover {
    color: var(--ink, #302e28);
}
.nosta-cmp-banner-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Common Buttons */
.nosta-cmp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    white-space: nowrap;
    border: 1px solid transparent;
}
.nosta-cmp-btn-accept {
    background: var(--olive, #60624d);
    color: #fff;
    border-color: var(--olive, #60624d);
}
.nosta-cmp-btn-accept:hover {
    background: #4d4f3e;
    border-color: #4d4f3e;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(96, 98, 77, 0.25);
}
.nosta-cmp-btn-reject {
    background: transparent;
    color: var(--ink, #302e28);
    border-color: var(--line, #ded8cd);
}
.nosta-cmp-btn-reject:hover {
    background: var(--soft, #eee8df);
    border-color: var(--line, #ded8cd);
}
.nosta-cmp-btn-manage {
    background: transparent;
    color: var(--olive, #60624d);
    border-color: transparent;
    text-decoration: underline;
    text-underline-offset: 4px;
}
.nosta-cmp-btn-manage:hover {
    color: var(--ink, #302e28);
    background: var(--soft, #eee8df);
    text-decoration: none;
}
.nosta-cmp-btn-save {
    background: var(--soft, #eee8df);
    color: var(--ink, #302e28);
    border-color: var(--line, #ded8cd);
}
.nosta-cmp-btn-save:hover {
    background: var(--line, #ded8cd);
}

/* Modal Dialog */
.nosta-cmp-modal-wrapper {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}
.nosta-cmp-modal-wrapper.visible {
    opacity: 1;
    pointer-events: auto;
}
.nosta-cmp-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(36, 39, 28, 0.52);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.nosta-cmp-modal-dialog {
    position: relative;
    width: 100%;
    max-width: 680px;
    max-height: 88vh;
    background: #fdfcf9;
    border: 1px solid var(--line, #ded8cd);
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(36, 39, 28, 0.28);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.96) translateY(10px);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.nosta-cmp-modal-wrapper.visible .nosta-cmp-modal-dialog {
    transform: scale(1) translateY(0);
}
body.nosta-cmp-modal-open {
    overflow: hidden;
}

/* Modal Header */
.nosta-cmp-modal-header {
    padding: 24px 28px 18px;
    border-bottom: 1px solid var(--line, #ded8cd);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}
.nosta-cmp-modal-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.55rem;
    font-weight: 400;
    color: var(--ink, #302e28);
    margin: 4px 0 0 0;
}
.nosta-cmp-close-btn {
    background: none;
    border: 0;
    font-size: 1.8rem;
    line-height: 1;
    color: var(--muted, #7c776f);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}
.nosta-cmp-close-btn:hover {
    color: var(--ink, #302e28);
    background: var(--soft, #eee8df);
}

/* Modal Body */
.nosta-cmp-modal-body {
    padding: 22px 28px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1 1 auto;
}
.nosta-cmp-modal-intro {
    font-size: 0.88rem;
    line-height: 1.65;
    color: var(--muted, #7c776f);
    margin: 0 0 20px 0;
}

/* Categories Cards */
.nosta-cmp-categories {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.nosta-cmp-category-card {
    background: #fff;
    border: 1px solid var(--line, #ded8cd);
    border-radius: 10px;
    padding: 16px 20px;
    transition: border-color 0.25s;
}
.nosta-cmp-category-card:hover {
    border-color: var(--olive, #60624d);
}
.nosta-cmp-category-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 8px;
}
.nosta-cmp-category-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.nosta-cmp-category-info h4 {
    font-size: 0.96rem;
    font-weight: 600;
    color: var(--ink, #302e28);
    margin: 0;
}
.nosta-cmp-badge {
    font-size: 0.68rem;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 4px;
    background: var(--soft, #eee8df);
    color: var(--muted, #7c776f);
    letter-spacing: 0.04em;
}
.nosta-cmp-badge-locked {
    background: #e9ece4;
    color: var(--olive, #60624d);
    font-weight: 600;
}
.nosta-cmp-category-desc {
    font-size: 0.84rem;
    line-height: 1.6;
    color: var(--muted, #7c776f);
    margin: 0;
}
.nosta-cmp-cookie-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}
.nosta-cmp-tag {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.72rem;
    background: #f7f5f0;
    color: #55524b;
    border: 1px solid #e3dec3;
    padding: 2px 7px;
    border-radius: 4px;
}

/* iOS-style Toggle Switch */
.nosta-cmp-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    cursor: pointer;
}
.nosta-cmp-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.nosta-cmp-slider {
    position: absolute;
    inset: 0;
    background-color: #d1cbc1;
    border-radius: 24px;
    transition: background-color 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.nosta-cmp-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.18);
}
.nosta-cmp-switch input:checked + .nosta-cmp-slider {
    background-color: var(--olive, #60624d);
}
.nosta-cmp-switch input:checked + .nosta-cmp-slider:before {
    transform: translateX(20px);
}
.nosta-cmp-switch-disabled {
    cursor: not-allowed;
    opacity: 0.75;
}
.nosta-cmp-switch-disabled .nosta-cmp-slider {
    background-color: var(--olive, #60624d);
}

/* Modal Footer */
.nosta-cmp-modal-footer {
    padding: 16px 28px;
    background: #f7f5f0;
    border-top: 1px solid var(--line, #ded8cd);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.nosta-cmp-modal-footer-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Floating Badge Button */
.nosta-cmp-badge-trigger {
    position: fixed;
    bottom: 22px;
    left: 22px;
    z-index: 9998;
    background: #fdfcf9;
    color: var(--ink, #302e28);
    border: 1px solid var(--line, #ded8cd);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 0.76rem;
    font-weight: 500;
    display: none;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(48, 46, 40, 0.1);
    transition: all 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    opacity: 0;
    transform: translateY(10px);
}
.nosta-cmp-badge-trigger.visible {
    opacity: 1;
    transform: translateY(0);
}
.nosta-cmp-badge-trigger:hover {
    background: #fff;
    border-color: var(--olive, #60624d);
    color: var(--olive, #60624d);
    box-shadow: 0 6px 20px rgba(48, 46, 40, 0.16);
    transform: translateY(-2px);
}
.nosta-cmp-badge-icon {
    color: var(--olive, #60624d);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .nosta-cmp-banner {
        bottom: 12px;
        left: 12px;
        right: 12px;
        border-radius: 12px;
    }
    .nosta-cmp-banner-inner {
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
        gap: 18px;
    }
    .nosta-cmp-banner-actions {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }
    .nosta-cmp-banner-actions .nosta-cmp-btn {
        width: 100%;
    }
    .nosta-cmp-banner-actions .nosta-cmp-btn-manage {
        order: 3;
    }
    .nosta-cmp-banner-actions .nosta-cmp-btn-reject {
        order: 2;
    }
    .nosta-cmp-banner-actions .nosta-cmp-btn-accept {
        order: 1;
    }

    .nosta-cmp-modal-wrapper {
        padding: 12px;
    }
    .nosta-cmp-modal-dialog {
        max-height: 92vh;
        border-radius: 14px;
    }
    .nosta-cmp-modal-header {
        padding: 18px 20px 14px;
    }
    .nosta-cmp-modal-body {
        padding: 16px 20px;
    }
    .nosta-cmp-modal-footer {
        padding: 14px 20px;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .nosta-cmp-modal-footer-right {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }
    .nosta-cmp-modal-footer .nosta-cmp-btn {
        width: 100%;
    }

    .nosta-cmp-badge-trigger {
        bottom: 16px;
        left: 16px;
        padding: 7px 12px;
        font-size: 0.72rem;
    }
}
