/**
 * GMRR Country Report — Sticky Sample PDF Bar Styles
 * Design tokens: navy #1e3a5f · gold #d4a017 · teal #0e9488 · off-white #f8fafc
 */

/* ── Sticky bar ── */
.gmrr-sticky-bar {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 99990;
    background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 100%);
    color: #fff;
    box-shadow: 0 0 24px rgba(15, 23, 42, 0.25);
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.gmrr-sticky-bar[hidden] {
    display: none !important;
}

.gmrr-sticky-bar--top {
    top: 0;
    border-bottom: 3px solid #d4a017;
}

.gmrr-sticky-bar--bottom {
    bottom: 0;
    border-top: 3px solid #d4a017;
}

.gmrr-sticky-bar-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
    padding: 12px 20px;
}

.gmrr-sticky-bar-text {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 14.5px;
    text-align: center;
}

.gmrr-sticky-bar-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.gmrr-sticky-bar-message {
    line-height: 1.4;
}

.gmrr-sticky-bar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.gmrr-sticky-bar-cta {
    background: #d4a017;
    color: #1e3a5f;
    border: none;
    border-radius: 7px;
    padding: 9px 22px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s, transform 0.15s;
    letter-spacing: 0.01em;
}

.gmrr-sticky-bar-cta:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.gmrr-sticky-bar-close {
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #fff;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    flex-shrink: 0;
}

.gmrr-sticky-bar-close:hover {
    background: rgba(255, 255, 255, 0.22);
}

/* Slide-in animation depending on position */
.gmrr-sticky-bar--top.gmrr-sticky-bar--enter {
    animation: gmrr-sticky-slide-down 0.35s ease forwards;
}

.gmrr-sticky-bar--bottom.gmrr-sticky-bar--enter {
    animation: gmrr-sticky-slide-up 0.35s ease forwards;
}

@keyframes gmrr-sticky-slide-down {
    from { transform: translateY(-100%); }
    to   { transform: translateY(0); }
}

@keyframes gmrr-sticky-slide-up {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

/* Highlight pulse for the on-page form being scrolled to */
.gmrr-sticky-highlight-target {
    animation: gmrr-sticky-pulse 1.4s ease 2;
    border-radius: 10px;
}

@keyframes gmrr-sticky-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212, 160, 23, 0); }
    50%      { box-shadow: 0 0 0 8px rgba(212, 160, 23, 0.35); }
}

/* ── Responsive bar ── */
@media (max-width: 640px) {
    .gmrr-sticky-bar-inner {
        flex-direction: column;
        gap: 10px;
        padding: 12px 16px;
    }

    .gmrr-sticky-bar-text {
        font-size: 13px;
    }

    .gmrr-sticky-bar-actions {
        width: 100%;
        justify-content: center;
    }

    .gmrr-sticky-bar-cta {
        flex: 1;
    }
}

/* ─────────────────────────────────────────────────────
   FALLBACK MODAL (shown only when no on-page form found)
───────────────────────────────────────────────────── */

.gmrr-sticky-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: gmrr-sticky-overlay-in 0.25s ease forwards;
}

.gmrr-sticky-modal-overlay[hidden] {
    display: none !important;
}

@keyframes gmrr-sticky-overlay-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.gmrr-sticky-modal-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
    max-width: 480px;
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    position: relative;
    padding: 32px 32px 28px;
    animation: gmrr-sticky-card-in 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes gmrr-sticky-card-in {
    from { transform: translateY(24px) scale(0.97); opacity: 0; }
    to   { transform: translateY(0)    scale(1);    opacity: 1; }
}

.gmrr-sticky-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    color: #94a3b8;
    padding: 4px 6px;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}
.gmrr-sticky-modal-close:hover {
    background: #f1f5f9;
    color: #334155;
}

.gmrr-sticky-modal-header {
    text-align: center;
    margin-bottom: 18px;
}

.gmrr-sticky-modal-icon {
    font-size: 2.4rem;
    line-height: 1;
    margin-bottom: 8px;
}

.gmrr-sticky-modal-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #1e3a5f;
    margin: 0 0 8px;
    line-height: 1.25;
}

.gmrr-sticky-modal-subtitle {
    font-size: 0.88rem;
    color: #475569;
    margin: 0;
    line-height: 1.6;
}

.gmrr-sticky-modal-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

.gmrr-sticky-modal-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.gmrr-sticky-modal-field label {
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.gmrr-sticky-modal-required {
    color: #ef4444;
}

.gmrr-sticky-modal-field input {
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 14px;
    color: #1e293b;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}

.gmrr-sticky-modal-field input::placeholder {
    color: #94a3b8;
}

.gmrr-sticky-modal-field input:focus {
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.12);
}

.gmrr-sticky-modal-field input.gmrr-sticky-modal-input-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.gmrr-sticky-modal-privacy {
    font-size: 11px;
    color: #94a3b8;
    margin: 0 0 16px;
    line-height: 1.5;
    text-align: center;
}

.gmrr-sticky-modal-privacy a {
    color: #1e40af;
    text-decoration: underline;
}

.gmrr-sticky-modal-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 100%);
    color: #fff;
    border: none;
    border-radius: 9px;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(30, 58, 95, 0.35);
}

.gmrr-sticky-modal-submit:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.gmrr-sticky-modal-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.gmrr-sticky-modal-spinner svg {
    animation: gmrr-sticky-spin 0.8s linear infinite;
}

@keyframes gmrr-sticky-spin {
    to { transform: rotate(360deg); }
}

.gmrr-sticky-modal-error {
    margin-top: 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    text-align: center;
}

.gmrr-sticky-modal-error[hidden] { display: none !important; }

.gmrr-sticky-modal-success {
    text-align: center;
    padding: 14px 0 6px;
}

.gmrr-sticky-modal-success[hidden] { display: none !important; }

.gmrr-sticky-modal-success-icon {
    font-size: 2.8rem;
    margin-bottom: 10px;
    line-height: 1;
}

.gmrr-sticky-modal-success h3 {
    font-size: 1.2rem;
    font-weight: 800;
    color: #1e3a5f;
    margin: 0 0 8px;
}

.gmrr-sticky-modal-success p {
    color: #475569;
    font-size: 0.88rem;
    margin: 0 0 18px;
    line-height: 1.6;
}

.gmrr-sticky-modal-close-btn {
    background: #0e9488;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 26px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
}

.gmrr-sticky-modal-close-btn:hover { opacity: 0.88; }

@media (max-width: 480px) {
    .gmrr-sticky-modal-card {
        padding: 26px 20px 22px;
        border-radius: 12px;
    }

    .gmrr-sticky-modal-form-grid {
        grid-template-columns: 1fr;
    }
}
