/**
 * ClubCore Push — v2.7.0
 * Permission prompt, foreground toast, settings sheet meldingen.
 */

/* ── Permission Prompt ─────────────────────────────────────────────── */

.cc-push-prompt {
    position: fixed;
    bottom: 80px; /* boven bottom bar */
    left: 12px;
    right: 12px;
    z-index: 99998;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,.15), 0 0 0 1px rgba(0,0,0,.05);
    padding: 16px;
    transform: translateY(120%);
    opacity: 0;
    transition: transform .3s ease, opacity .3s ease;
    max-width: 400px;
    margin: 0 auto;
}
.cc-push-prompt--visible {
    transform: translateY(0);
    opacity: 1;
}

.cc-push-prompt__content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}
.cc-push-prompt__icon {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
}
.cc-push-prompt__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.cc-push-prompt__text strong {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
}
.cc-push-prompt__text span {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
}

.cc-push-prompt__actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}
.cc-push-prompt__btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: opacity .15s;
}
.cc-push-prompt__btn:active { opacity: .8; }
.cc-push-prompt__btn--dismiss {
    background: transparent;
    color: #6b7280;
}
.cc-push-prompt__btn--accept {
    background: var(--ccn-accent, #1e3a5f);
    color: #fff;
}

/* Safe area voor niet-standalone (browser) */
@media (display-mode: standalone) {
    .cc-push-prompt {
        bottom: calc(env(safe-area-inset-bottom, 0px) + 80px);
    }
}

/* ── Foreground Toast ──────────────────────────────────────────────── */

.cc-push-toast {
    position: fixed;
    top: 60px; /* onder de app header */
    left: 12px;
    right: 12px;
    z-index: 99999;
    background: #1a1a1a;
    color: #fff;
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    box-shadow: 0 4px 16px rgba(0,0,0,.2);
    transform: translateY(-120%);
    opacity: 0;
    transition: transform .3s ease, opacity .3s ease;
    max-width: 400px;
    margin: 0 auto;
}
.cc-push-toast--visible {
    transform: translateY(0);
    opacity: 1;
}
.cc-push-toast strong {
    font-size: 14px;
    font-weight: 600;
}
.cc-push-toast span {
    font-size: 13px;
    opacity: .85;
    line-height: 1.3;
}

@media (display-mode: standalone) {
    .cc-push-toast {
        top: calc(env(safe-area-inset-top, 0px) + 60px);
    }
}

/* ── Settings Sheet: Meldingen sectie ──────────────────────────────── */

.cc-push-settings {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cc-push-master {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
}
.cc-push-master__label {
    font-size: 15px;
    font-weight: 500;
    color: #1a1a1a;
}

/* iOS-stijl toggle */
.cc-push-toggle {
    position: relative;
    width: 48px;
    height: 28px;
    flex-shrink: 0;
}
.cc-push-toggle input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    margin: 0;
    z-index: 1;
}
.cc-push-toggle__track {
    position: absolute;
    inset: 0;
    background: #d1d5db;
    border-radius: 14px;
    transition: background .2s;
}
.cc-push-toggle input:checked + .cc-push-toggle__track {
    background: var(--ccn-accent, #1e3a5f);
}
.cc-push-toggle__thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,.15);
    transition: transform .2s;
    pointer-events: none;
}
.cc-push-toggle input:checked ~ .cc-push-toggle__thumb {
    transform: translateX(20px);
}

.cc-push-denied-hint {
    font-size: 12px;
    color: #dc2626;
    line-height: 1.4;
}

/* Topic lijst */
.cc-push-topics {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid #e5e7eb;
}
.cc-push-topic-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}
.cc-push-topic-row__left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #374151;
    flex: 1;
    min-width: 0;
}
.cc-push-topic-row__icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}
.cc-push-topic-row__info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}
.cc-push-topic-row__name {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}
.cc-push-topic-row__desc {
    font-size: 11px;
    color: #9ca3af;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cc-push-topic-feedback {
    font-size: 12px;
    color: #16a34a;
    opacity: 0;
    transition: opacity .3s;
    min-height: 18px;
}

/* ── Diagnostische status ──────────────────────────────────────────── */

.cc-push-status {
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 6px;
    background: #f3f4f6;
    color: #6b7280;
    margin: 4px 0 8px;
    line-height: 1.4;
    word-break: break-word;
}
.cc-push-status--ok {
    background: #ecfdf5;
    color: #059669;
}
.cc-push-status--error {
    background: #fef2f2;
    color: #dc2626;
}
.cc-push-status--info {
    background: #eff6ff;
    color: #2563eb;
}
