/* ==========================================================
   Site Popup — Unified popup/modal style system
   ========================================================== */

/* ---- Custom popup overlay (.site-popup) ---- */

.site-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.site-popup.is-active {
    display: flex;
}

.site-popup-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
}

.site-popup-card {
    position: relative;
    max-width: 500px;
    width: 90%;
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    text-align: center;
    animation: popup-slide-down 0.3s ease-out;
}

@keyframes popup-slide-down {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.site-popup-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 30px;
    height: 30px;
    background: rgba(0, 0, 0, 0.07);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #555;
    font-size: 18px;
    line-height: 1;
    transition: background 0.2s;
    padding: 0;
}

.site-popup-close:hover {
    background: rgba(0, 0, 0, 0.15);
    color: #111;
}

.site-popup-icon {
    font-size: 54px;
    margin-bottom: 14px;
    line-height: 1;
}

.site-popup-title {
    margin: 0 0 14px;
    font-size: 26px;
    font-weight: 700;
    color: #222;
}

.site-popup-body {
    color: #555;
    font-size: 15px;
    line-height: 1.6;
}

.site-popup-body p {
    margin: 0 0 10px;
}

.site-popup-body p:last-child {
    margin-bottom: 0;
}

.site-popup-body a {
    color: #e74c3c;
    text-decoration: underline;
}

.site-popup-body ul {
    text-align: left;
    padding-left: 22px;
    margin: 10px 0;
}

.site-popup-body li {
    margin: 6px 0;
}

.site-popup-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 22px;
}

.site-popup-btn-primary {
    display: block;
    width: 100%;
    padding: 14px;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background 0.2s;
}

.site-popup-btn-primary:hover {
    background: #c0392b;
    color: #fff;
    text-decoration: none;
}

.site-popup-btn-secondary {
    display: block;
    width: 100%;
    padding: 10px;
    background: transparent;
    color: #999;
    border: none;
    font-size: 14px;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.2s;
}

.site-popup-btn-secondary:hover {
    color: #555;
}

/* ---- Bootstrap modal overrides ---- */

.modal-backdrop {
    backdrop-filter: blur(5px);
}

.modal-backdrop.show {
    opacity: 0.85;
}

.modal-content {
    background: #fff !important;
    border: none !important;
    border-radius: 12px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5) !important;
    color: #333 !important;
    animation: popup-slide-down 0.3s ease-out;
}

.modal-header {
    border-bottom: none !important;
    padding: 28px 28px 8px !important;
}

.modal-header .close {
    color: #555 !important;
    opacity: 1 !important;
    font-size: 26px !important;
    text-shadow: none !important;
    font-weight: 400 !important;
}

.modal-header .close:hover {
    color: #111 !important;
}

.modal-title {
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #222 !important;
}

.modal-body {
    padding: 8px 28px 20px !important;
    color: #555 !important;
}

.modal-footer {
    border-top: none !important;
    padding: 0 28px 28px !important;
}

.modal-body label,
.modal-footer label {
    color: #555;
}

.modal-body .form-control {
    background: #f5f5f5;
    border-color: #ddd;
    color: #333;
}

.modal-body .form-control:focus {
    background: #fff;
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.12);
    color: #333;
}

.modal-body .form-check-label {
    color: #555;
}

.modal-body hr {
    border-color: #eee;
}

.modal-body .btn-primary,
.modal-footer .btn-primary {
    background: #e74c3c !important;
    border-color: #e74c3c !important;
    font-weight: 600;
    padding: 11px 20px;
}

.modal-body .btn-primary:hover,
.modal-footer .btn-primary:hover {
    background: #c0392b !important;
    border-color: #c0392b !important;
}

.modal-body a {
    color: #e74c3c;
}

/* ---- Share modal (Bootstrap-triggered, light theme) ---- */

.share-modal-card {
    padding: 28px 28px 24px;
}

.share-modal-title {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: #222;
    margin: 0 0 20px;
}

.share-modal-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.share-social-icons {
    display: flex;
    gap: 10px;
}

.share-social-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #f0f0f0;
    border: none;
    color: #333;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    font-family: monospace;
    letter-spacing: -1px;
    text-decoration: none;
    transition: background-color 0.2s;
}

.share-social-btn:hover {
    background-color: #e0e0e0;
    color: #111;
    text-decoration: none;
}

.share-embed-section {
    display: none;
}

.share-link-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #777;
    margin-bottom: 6px;
}

.share-link-input-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.share-link-input {
    flex: 1;
    border: none;
    background: #f8f8f8;
    padding: 10px 12px;
    font-size: 14px;
    color: #333;
    outline: none;
    min-width: 0;
}

.share-copy-btn {
    background: #e74c3c;
    color: #fff;
    border: none;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.2s;
}

.share-copy-btn:hover {
    background: #c0392b;
}

/* ---- Responsive ---- */

@media (max-width: 600px) {
    .site-popup-card {
        padding: 28px 20px;
    }

    .site-popup-title {
        font-size: 22px;
    }
}
