/* ================= Bell Wrapper ================= */
#cc-bell-wrapper {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

/* ================= Bell Icon ================= */
#cc-bell {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #BBCB64;
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 26px;
    cursor: pointer;

    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    transform-origin: 50% 0%;
    animation: cc-bell-shake 1.6s ease-in-out infinite;
    transition: opacity .3s ease, visibility .3s ease, transform .3s ease;
}

/* Hidden state */
#cc-bell.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Pause animation */
#cc-bell.is-paused {
    animation-play-state: paused;
}

/* ================= Close (×) ================= */
#cc-bell-close {
    position: absolute;
    bottom: -20px; /* 2px بالاتر */
    left: 50%;
    transform: translateX(calc(-50% - 10px)); /* 10px به چپ */

    width: 20px;
    height: 20px;
    background: #4d4d4d;
    color: #fff;
    border-radius: 50%;
    font-size: 20px;
    line-height: 20px;
    text-align: center;
    cursor: pointer;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, visibility .2s ease;
}

/* Show close ONLY when bell is visible */
#cc-bell-wrapper:not(.is-hidden)
#cc-bell:not(.is-hidden) + #cc-bell-close {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ================= Bell Animation (Real Bell) ================= */
@keyframes cc-bell-shake {
    0%   { transform: rotate(0); }
    10%  { transform: rotate(14deg); }
    20%  { transform: rotate(-14deg); }
    30%  { transform: rotate(12deg); }
    40%  { transform: rotate(-12deg); }
    50%  { transform: rotate(8deg); }
    60%  { transform: rotate(-8deg); }
    70%  { transform: rotate(4deg); }
    80%  { transform: rotate(-4deg); }
    100% { transform: rotate(0); }
}

/* ================= Modal Overlay ================= */
#cc-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 9998;
}

/* ================= Modal Box ================= */
.cc-box {
    background: #fff;
    max-width: 400px;
    margin: 8% auto;
    padding: 25px;
    border-radius: 14px;
    box-shadow: 0 12px 35px rgba(0,0,0,.25);
    position: relative;
}

.cc-box h3 {
    margin-bottom: 15px;
    font-size: 18px;
}

/* ================= Inputs & Button ================= */
.cc-box input,
.cc-box button {
    width: 100%;
    padding: 11px;
    margin-top: 10px;
    border-radius: 8px;
    font-size: 14px;
}

.cc-box input {
    border: 1px solid #ddd;
}

.cc-box button {
    background: #BBCB64;
    border: none;
    color: #fff;
    cursor: pointer;
}

.cc-box button:disabled {
    opacity: .6;
    cursor: not-allowed;
}

/* ================= Message ================= */
#cc-message {
    margin-top: 10px;
    font-size: 13px;
}

/* ================= Modal Close ================= */
.cc-close {
    position: absolute;
    top: 10px;
    left: 12px;
    font-size: 22px;
    cursor: pointer;
}

/* ================= Mobile Fix ================= */
@media (max-width: 480px) {
    .cc-box {
        margin: 12% 12px;
    }
}
