/* ═══════════════════════════════════════════════════════════════════════════ */
/*  GolfPayments Brand System                                                */
/*  Color tokens, logo, splash screen, topbar, loading states                */
/* ═══════════════════════════════════════════════════════════════════════════ */

/* ─── CSS Variables ──────────────────────────────────────────────────────── */

:root {
    --gp-dark:        #0b1f0e;
    --gp-green:       #22c55e;
    --gp-green-hover: #16a34a;
    --gp-green-light: #dcfce7;
    --gp-gold:        #c8952a;
    --gp-gray-50:     #f4f6f3;
    --gp-gray-100:    #dde8de;
    --gp-text:        #0a1f0e;
    --gp-text-muted:  #5a7a5e;
    --gp-text-faint:  #7a9a7e;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/*  Splash Screen                                                            */
/* ═══════════════════════════════════════════════════════════════════════════ */

.gp-splash {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--gp-dark);
    opacity: 1;
    transition: opacity 0.5s ease;
}

.gp-splash.gp-splash--fade-out {
    opacity: 0;
    pointer-events: none;
}

.gp-splash-logo {
    width: 120px;
    height: 135px;
}

.gp-splash-wordmark {
    margin-top: 20px;
    text-align: center;
    line-height: 1;
}

.gp-splash-wordmark-name {
    font-family: 'Century Gothic', 'Gill Sans MT', 'Gill Sans', Arial, sans-serif;
    font-size: 36px;
}

.gp-splash-wordmark-name .gp-word-golf {
    color: #fff;
    font-weight: 300;
}

.gp-splash-wordmark-name .gp-word-payments {
    color: var(--gp-green);
    font-weight: 700;
}

.gp-splash-wordmark-tagline {
    font-family: 'Century Gothic', 'Gill Sans MT', 'Gill Sans', Arial, sans-serif;
    font-size: 9px;
    font-weight: 300;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: var(--gp-gold);
    margin-top: 6px;
}

/* Flagstick + flag drop animation (splash) */
.gp-splash .gp-flag-group {
    transform: translateY(-60px);
    opacity: 0;
    animation: gp-flag-drop 1.6s cubic-bezier(.25, 0, .2, 1) 0.2s forwards;
}

/* Green rings fade in */
.gp-splash .gp-green-rings {
    opacity: 0;
    animation: gp-rings-fade 0.8s ease 0.6s forwards;
}

/* Wordmark fade in */
.gp-splash .gp-splash-wordmark {
    opacity: 0;
    animation: gp-rings-fade 0.6s ease 1.2s forwards;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/*  Topbar                                                                   */
/* ═══════════════════════════════════════════════════════════════════════════ */

.gp-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    background: var(--gp-dark);
    border-radius: 10px;
    margin-bottom: 24px;
}

.gp-topbar-logo {
    width: 36px;
    height: 40px;
    flex-shrink: 0;
}

/* Topbar flag drop — plays once on load */
.gp-topbar-logo .gp-flag-group {
    transform: translateY(-20px);
    opacity: 0;
    animation: gp-flag-drop-sm 1.6s cubic-bezier(.25, 0, .2, 1) 0.1s forwards;
}

.gp-topbar-wordmark {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.gp-topbar-name {
    font-family: 'Century Gothic', 'Gill Sans MT', 'Gill Sans', Arial, sans-serif;
    font-size: 20px;
}

.gp-topbar-name .gp-word-golf {
    color: #fff;
    font-weight: 300;
}

.gp-topbar-name .gp-word-payments {
    color: var(--gp-green);
    font-weight: 700;
}

.gp-topbar-tagline {
    font-family: 'Century Gothic', 'Gill Sans MT', 'Gill Sans', Arial, sans-serif;
    font-size: 8px;
    font-weight: 300;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: var(--gp-gold);
    margin-top: 2px;
}

.gp-topbar-spacer {
    flex: 1;
}

.gp-topbar-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    white-space: nowrap;
    transition: background 0.15s;
}

.gp-topbar-back:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    text-decoration: none;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/*  Loading State — .gp-loading                                              */
/* ═══════════════════════════════════════════════════════════════════════════ */

.gp-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    animation: gp-pulse 1.2s ease-in-out infinite;
}

.gp-loading svg {
    width: 100%;
    height: 100%;
}

/* Small inline variant */
.gp-loading-sm {
    width: 20px;
    height: 20px;
}

/* Block centered variant */
.gp-loading-block {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    width: 100%;
}

.gp-loading-block .gp-loading {
    width: 56px;
    height: 56px;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/*  Keyframes                                                                */
/* ═══════════════════════════════════════════════════════════════════════════ */

/* Full-size flag drop (splash) */
@keyframes gp-flag-drop {
    0% {
        transform: translateY(-60px);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Small flag drop (topbar) */
@keyframes gp-flag-drop-sm {
    0% {
        transform: translateY(-20px);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Rings/elements fade in */
@keyframes gp-rings-fade {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Loading pulse */
@keyframes gp-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(0.85);
    }
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/*  Portal Full-Width Override                                               */
/*  Forces the WC My Account page to full width when gp-portal-page is on   */
/*  <body>, overriding theme max-width / sidebar constraints.                */
/* ═══════════════════════════════════════════════════════════════════════════ */

.gp-portal-page .site-content,
.gp-portal-page .content-area,
.gp-portal-page .entry-content,
.gp-portal-page .page-content,
.gp-portal-page main,
.gp-portal-page .site-main,
.gp-portal-page .hentry,
.gp-portal-page article,
.gp-portal-page .woocommerce,
.gp-portal-page .woocommerce-MyAccount-content,
.gp-portal-page .container,
.gp-portal-page .site-container,
.gp-portal-page .ast-container,
.gp-portal-page .starter-theme-container,
.gp-portal-page .starter-theme-content,
.gp-portal-page .starter-theme-wrap {
    max-width: 100%;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
    float: none;
}

/* Remove sidebar on the portal page */
.gp-portal-page .widget-area,
.gp-portal-page .sidebar,
.gp-portal-page aside.sidebar,
.gp-portal-page #secondary {
    display: none;
}

/* Let the WC account layout itself breathe */
.gp-portal-page .woocommerce-MyAccount-navigation {
    width: 220px;
    flex-shrink: 0;
}

.gp-portal-page .woocommerce-MyAccount-content {
    flex: 1;
    min-width: 0;
}

/* Use flexbox for the WC account wrapper when possible */
.gp-portal-page .woocommerce-account .woocommerce {
    display: flex;
    gap: 30px;
}

/* Restore sensible page padding */
.gp-portal-page .entry-content,
.gp-portal-page .page-content,
.gp-portal-page .site-main {
    padding: 20px;
}

@media (max-width: 768px) {
    .gp-portal-page .woocommerce-account .woocommerce {
        flex-direction: column;
    }

    .gp-portal-page .woocommerce-MyAccount-navigation {
        width: 100%;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/*  Utility                                                                  */
/* ═══════════════════════════════════════════════════════════════════════════ */

/* Hide splash after animation */
.gp-splash--hidden {
    display: none;
}
