﻿/* =========================================================
   CRAZYNUTS PROFESSIONAL POPUP
   ========================================================= */

.cn-popBlur .cn-shell {
    filter: blur(5px);
    transform: scale(.995);
    transition: filter .25s ease, transform .25s ease;
}


/* =========================================================
   ROOT
   ========================================================= */

.cn-pop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    padding: 20px;
    box-sizing: border-box;
}

    .cn-pop.is-open {
        display: block;
    }


/* =========================================================
   BACKDROP
   ========================================================= */

.cn-pop__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 13, 8, .48);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    animation: cnPopBackdropIn .22s ease both;
}


/* =========================================================
   ANIMATION
   ========================================================= */

@keyframes cnPopBackdropIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes cnPopIn {
    0% {
        opacity: 0;
        transform: translate(-50%, -46%) scale(.94);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}


/* =========================================================
   PANEL
   ========================================================= */

.cn-pop__panel {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min( 560px, calc(100% - 32px) );
    box-sizing: border-box;
    overflow: hidden;
    border-radius: 26px;
    padding: 34px 34px 30px;
    background: radial-gradient( circle at 100% 0%, rgba(245, 130, 32, .10), transparent 38% ), linear-gradient( 180deg, #ffffff 0%, #fffaf6 100% );
    border: 1px solid rgba(245, 130, 32, .18);
    box-shadow: 0 35px 90px rgba(38, 20, 8, .25);
    color: #18130f;
    animation: cnPopIn .32s cubic-bezier(.2,.8,.25,1) both;
}


/* Top orange accent */

.cn-pop__accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient( 90deg, var(--cn-brand-orange, #f58220), #f9a14a, var(--cn-brand-orange-dark, #d86712) );
}


/* =========================================================
   CLOSE BUTTON
   ========================================================= */

.cn-pop__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,.08);
    background: rgba(255,255,255,.82);
    color: #58504a;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, transform .15s ease, border-color .15s ease;
}

    .cn-pop__close:hover {
        background: #fff;
        color: var( --cn-brand-orange-dark, #d86712 );
        border-color: rgba(245,130,32,.28);
        transform: rotate(3deg);
    }


/* =========================================================
   HEADER
   ========================================================= */

.cn-pop__header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-right: 42px;
    margin-bottom: 20px;
}


/* Icon */

.cn-pop__icon {
    width: 60px;
    height: 60px;
    flex: 0 0 60px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient( 135deg, var(--cn-brand-orange, #f58220), var(--cn-brand-orange-dark, #d86712) );
    box-shadow: 0 12px 28px rgba(245,130,32,.24);
}


/* Header text */

.cn-pop__heading {
    min-width: 0;
}

.cn-pop__eyebrow {
    margin-bottom: 4px;
    color: var( --cn-brand-orange-dark, #d86712 );
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .16em;
    line-height: 1;
    text-transform: uppercase;
}


/* =========================================================
   TITLE
   ========================================================= */

.cn-pop__title {
    margin: 0;
    color: #18130f;
    font-size: 24px;
    font-weight: 900;
    line-height: 1.18;
    letter-spacing: -.025em;
    overflow-wrap: anywhere;
}


/* =========================================================
   BODY
   ========================================================= */

.cn-pop__body {
    margin: 0 0 26px;
    color: #665e57;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.65;
    white-space: pre-line;
    overflow-wrap: anywhere;
}


/* =========================================================
   ACTIONS
   ========================================================= */

.cn-pop__actions {
    display: flex;
    justify-content: flex-start;
}


/* CTA */

.cn-pop__cta {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-sizing: border-box;
    padding: 12px 20px;
    border-radius: 14px;
    text-decoration: none;
    background: linear-gradient( 135deg, var(--cn-brand-orange, #f58220), var(--cn-brand-orange-dark, #d86712) );
    color: #fff;
    border: 1px solid var( --cn-brand-orange, #f58220 );
    font-size: 14px;
    font-weight: 900;
    box-shadow: 0 12px 26px rgba(245,130,32,.22);
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

    .cn-pop__cta:hover {
        color: #fff;
        transform: translateY(-2px);
        box-shadow: 0 16px 32px rgba(245,130,32,.30);
        filter: brightness(1.02);
    }

    .cn-pop__cta svg {
        transition: transform .15s ease;
    }

    .cn-pop__cta:hover svg {
        transform: translateX(3px);
    }


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .cn-pop {
        padding: 14px;
    }

    .cn-pop__panel {
        width: calc( 100% - 24px );
        padding: 28px 22px 22px;
        border-radius: 22px;
    }

    .cn-pop__header {
        gap: 13px;
        padding-right: 30px;
        margin-bottom: 18px;
    }

    .cn-pop__icon {
        width: 52px;
        height: 52px;
        flex: 0 0 52px;
        border-radius: 16px;
    }

        .cn-pop__icon svg {
            width: 24px;
            height: 24px;
        }

    .cn-pop__title {
        font-size: 20px;
    }

    .cn-pop__body {
        margin-bottom: 20px;
        font-size: 14px;
        line-height: 1.6;
    }

    .cn-pop__cta {
        width: 100%;
    }

    .cn-pop__close {
        top: 12px;
        right: 12px;
        width: 34px;
        height: 34px;
    }
}


@media (max-width: 380px) {

    .cn-pop__panel {
        padding: 26px 18px 18px;
    }

    .cn-pop__header {
        align-items: flex-start;
    }

    .cn-pop__icon {
        width: 46px;
        height: 46px;
        flex-basis: 46px;
    }

    .cn-pop__title {
        font-size: 18px;
    }
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .cn-pop__panel,
    .cn-pop__backdrop {
        animation: none;
    }

    .cn-popBlur .cn-shell {
        transition: none;
    }

    .cn-pop__cta,
    .cn-pop__cta svg,
    .cn-pop__close {
        transition: none;
    }
}
