/* Space Core – Frontend Styles */

/* ── WhatsApp Floating Button ───────────────────────────────── */
.sc-wa-float {
    position: fixed;
    z-index: 9999;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .25);
    text-decoration: none;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}

.sc-wa-float svg {
    pointer-events: none;
}

/* Load animations */
@keyframes sc-bounce-in {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    60% {
        transform: scale(1.1);
        opacity: 1;
    }
    100% {
        transform: scale(1);
    }
}

@keyframes sc-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sc-load-bounce {
    animation: sc-bounce-in .5s ease forwards;
}

.sc-load-fade {
    animation: sc-fade-in .5s ease forwards;
}

/* Hover animations */
@keyframes sc-pulse {
    0%, 100% {
        box-shadow: 0 4px 16px rgba(0, 0, 0, .25);
    }
    50% {
        box-shadow: 0 4px 24px rgba(37, 211, 102, .6);
    }
}

@keyframes sc-shake {
    0%, 100% {
        transform: rotate(0deg);
    }
    20% {
        transform: rotate(-10deg);
    }
    40% {
        transform: rotate(10deg);
    }
    60% {
        transform: rotate(-8deg);
    }
    80% {
        transform: rotate(8deg);
    }
}

.sc-hover-pulse:hover {
    animation: sc-pulse .8s infinite;
}

.sc-hover-shake:hover {
    animation: sc-shake .5s ease;
}

/* ── Stock Notifier Form ────────────────────────────────────── */
.sc-stock-notifier {
    margin: 16px 0;
    padding: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fafafa;
}

.sc-sn-heading {
    font-weight: 600;
    margin: 0 0 10px 0;
}

.sc-sn-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.sc-sn-form input[type="email"],
.sc-sn-form input[type="tel"] {
    flex: 1 1 200px;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: .95rem;
}

.sc-sn-phone-group {
    display: flex;
    flex: auto;
    gap: 0;
    align-items: stretch;
}

/* Native <select> — hidden by Select2 but kept as fallback */
.sc-sn-phone-group .sc-sn-country-code {
    flex: 0 0 auto;
    padding: 8px 4px;
    border: 1px solid #ccc;
    border-right: none;
    border-radius: 4px 0 0 4px;
    font-size: .95rem;
    background: #f5f5f5;
    cursor: pointer;
    max-width: 120px;
}

/* Select2 container replaces the native <select> */
.sc-sn-phone-group .select2-container {
    flex: 0 0 auto;
}

.sc-sn-phone-group .select2-container .select2-selection--single {
    height: 100%;
    min-height: 38px;
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    border-right: none;
    border-radius: 4px 0 0 4px;
    background: #f5f5f5;
    font-size: .95rem;
    padding: 0 8px;
    box-sizing: border-box;
    white-space: nowrap;
}

.sc-sn-phone-group .select2-container .select2-selection__rendered {
    padding: 0;
    line-height: normal;
    color: inherit;
}

.sc-sn-phone-group .select2-container .select2-selection__arrow {
    height: 100%;
    top: 0;
}

/* Dropdown list */
.sc-sn-phone-group + .select2-container--open .select2-dropdown,
.select2-dropdown.select2-dropdown--below,
.select2-dropdown.select2-dropdown--above {
    min-width: 220px;
}

.sc-sn-phone-group input[type="tel"] {
    flex: 1 1 auto;
    border-radius: 0 4px 4px 0;
    min-width: 0;
}

.sc-sn-form button[type="submit"] {
    padding: 8px 20px;
    background: #222;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: .95rem;
    transition: background .2s;
}

.sc-sn-form button[type="submit"]:hover {
    background: #444;
}

.sc-sn-msg {
    display: block;
    width: 100%;
    font-size: .875rem;
    margin-top: 4px;
}

.sc-sn-msg.sc-success {
    color: #2e7d32;
}

.sc-sn-msg.sc-error {
    color: #c62828;
}


/* ── Store Notice ────────────────────────────────────── */

.sc-store-notice {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 99998;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, .15);
    box-sizing: border-box;
}

.sc-notice-body {
    flex: 1;
    text-align: center;
    min-width: 0;
}

.sc-notice-title {
    display: block;
    font-size: 1em;
    line-height: 1.3;
}

.sc-notice-msg {
    display: block;
    font-weight: 400;
    font-size: .92em;
    line-height: 1.4;
    margin-top: 2px;
    opacity: .95;
}

.sc-notice-title + .sc-notice-msg {
    margin-top: 4px;
}

.sc-notice-material-icon {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 20px;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
    -webkit-font-smoothing: antialiased;
    flex-shrink: 0;
}

.sc-notice-dismiss {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    opacity: .8;
    padding: 0 4px;
    line-height: 1;
    flex-shrink: 0;
}

.sc-notice-dismiss:hover {
    opacity: 1;
}

.sc-sn-form .sc-sn-phone-group {
    display: inline-grid;
    grid-template-columns: repeat(2, 1fr);
}

.sc-sn-form .select2-container > .selection {
    display: block;
    height: 100%;
}

.sc-sn-form .select2-container > .selection > .select2-selection.select2-selection--single {
    display: flex;
    height: 100%;
    align-items: center;
}

.sc-sn-form .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
}

@media (max-width: 782px) {
    .sc-store-notice {
        font-size: 13px;
        padding: 10px 12px;
        gap: 8px;
    }

    .sc-notice-body {
        text-align: left;
    }

    .sc-notice-msg {
        font-size: .88em;
    }

    .sc-sn-form {
        flex-direction: column;
        align-items: stretch;
    }
}
