/* =====================================================
   Simple Contact Form — Live Notifications
   ===================================================== */

/* ---- Toast Container ---- */
#scf-toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999999;
    display: flex;
    flex-direction: column-reverse;
    gap: 12px;
    pointer-events: none;
    max-width: 380px;
    width: calc(100vw - 48px);
}

/* Admin-Bar Offset */
.admin-bar #scf-toast-container {
    bottom: 44px;
}

/* ---- Einzelner Toast ---- */
.scf-toast {
    pointer-events: all;
    background: #1a1a2e;
    color: #fff;
    border-radius: 12px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.35),
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    padding: 0;
    overflow: hidden;
    border-left: 4px solid #6c63ff;
    display: flex;
    flex-direction: column;
    min-width: 300px;

    /* Einblend-Animation */
    opacity: 0;
    transform: translateX(40px) scale(0.97);
    animation: scf-toast-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.scf-toast.scf-toast-out {
    animation: scf-toast-out 0.3s ease-in forwards;
}

@keyframes scf-toast-in {
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes scf-toast-out {
    to {
        opacity: 0;
        transform: translateX(50px) scale(0.95);
    }
}

/* ---- Toast Header ---- */
.scf-toast-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px 10px;
    background: rgba(108, 99, 255, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.scf-toast-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #6c63ff, #a855f7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.25);
    animation: scf-pulse 2s ease-in-out infinite;
}

@keyframes scf-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.25); }
    50%       { box-shadow: 0 0 0 6px rgba(108, 99, 255, 0.1); }
}

.scf-toast-title {
    flex: 1;
}

.scf-toast-title strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #e0e0f0;
    letter-spacing: 0.3px;
}

.scf-toast-title span {
    font-size: 11px;
    color: #888;
    margin-top: 1px;
    display: block;
}

.scf-toast-close {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
    flex-shrink: 0;
}

.scf-toast-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* ---- Toast Body ---- */
.scf-toast-body {
    padding: 12px 16px 14px;
}

.scf-toast-name {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 3px;
}

.scf-toast-subject {
    font-size: 13px;
    color: #aaa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* ---- Toast Actions ---- */
.scf-toast-actions {
    display: flex;
    gap: 8px;
    padding: 0 16px 14px;
}

.scf-toast-btn {
    flex: 1;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    border: none;
    transition: filter 0.2s, transform 0.15s;
    letter-spacing: 0.3px;
}

.scf-toast-btn:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
    text-decoration: none;
}

.scf-toast-btn-primary {
    background: linear-gradient(135deg, #6c63ff, #a855f7);
    color: #fff !important;
}

.scf-toast-btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #ccc !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ---- Progress Bar ---- */
.scf-toast-progress {
    height: 3px;
    background: rgba(108, 99, 255, 0.25);
    position: relative;
    overflow: hidden;
}

.scf-toast-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #6c63ff, #a855f7);
    width: 100%;
    transform-origin: left;
    animation: scf-progress linear forwards;
}

@keyframes scf-progress {
    to { transform: scaleX(0); }
}

/* ---- Badge im Admin-Menü ---- */
#adminmenu .simple-contact-badge {
    background: #6c63ff;
    color: #fff;
    border-radius: 10px;
    padding: 2px 7px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 6px;
    animation: scf-badge-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-block;
}

@keyframes scf-badge-pop {
    from { transform: scale(0); }
    to   { transform: scale(1); }
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
    #scf-toast-container {
        bottom: 16px;
        right: 16px;
        left: 16px;
        width: auto;
        max-width: none;
    }

    .scf-toast {
        min-width: 0;
    }
}

/* =====================================================
   Permission Banner
   ===================================================== */

#scf-permission-banner {
    position: fixed;
    top: 72px; /* unter Admin-Bar */
    left: 50%;
    transform: translateX(-50%);
    z-index: 999998;
    background: #1a1a2e;
    color: #e0e0f0;
    border: 1px solid rgba(108, 99, 255, 0.4);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    max-width: 560px;
    width: calc(100vw - 40px);
    animation: scf-banner-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.admin-bar #scf-permission-banner {
    top: 104px;
}

@keyframes scf-banner-in {
    from { opacity: 0; transform: translateX(-50%) translateY(-16px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

#scf-permission-banner.scf-perm-out {
    animation: scf-banner-out 0.3s ease-in forwards;
}

@keyframes scf-banner-out {
    to { opacity: 0; transform: translateX(-50%) translateY(-20px); }
}

.scf-perm-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.scf-perm-text {
    flex: 1;
    font-size: 13px;
    line-height: 1.4;
    min-width: 160px;
}

.scf-perm-btn {
    padding: 7px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: filter 0.2s, transform 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}

.scf-perm-btn:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
}

.scf-perm-btn-yes {
    background: linear-gradient(135deg, #6c63ff, #a855f7);
    color: #fff;
}

.scf-perm-btn-no {
    background: rgba(255,255,255,0.08);
    color: #aaa;
    border: 1px solid rgba(255,255,255,0.1);
}

@media (max-width: 600px) {
    #scf-permission-banner {
        flex-direction: column;
        align-items: flex-start;
        top: 60px;
    }
    .admin-bar #scf-permission-banner {
        top: 100px;
    }
}
