/* =========================================================
   GHY Donations — Frontend Form Styles
   Design: dark background, gold gradient matching GHY theme
   ========================================================= */

@keyframes ghyFadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ghyPulse {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(203, 155, 81, 0.4);
    }

    50% {
        box-shadow: 0 0 40px rgba(246, 226, 122, 0.7);
    }
}

/* ── Wrapper ───────────────────────────────────────────── */
.ghy-donation-wrap {
    max-width: 680px;
    margin: 0 auto;
    padding-bottom: 40px;
    animation: ghyFadeUp 0.8s ease-out both;
    position: relative;
    z-index: 1;
}

/* ── Ambient warm glow behind the form ── */
body:has(.ghy-donation-wrap) #primary {
    position: relative;
}

body:has(.ghy-donation-wrap) #primary::before {
    content: '';
    position: absolute;
    top: 25%;
    left: 50%;
    transform: translateX(-50%);
    width: 700px;
    height: 700px;
    background: radial-gradient(ellipse at center,
            rgba(203, 155, 81, 0.07) 0%,
            rgba(203, 155, 81, 0.02) 40%,
            transparent 70%);
    pointer-events: none;
    z-index: 0;
    animation: ghyAmbientBreath 6s ease-in-out infinite;
}

@keyframes ghyAmbientBreath {

    0%,
    100% {
        opacity: 0.5;
        transform: translateX(-50%) scale(1);
    }

    50% {
        opacity: 1;
        transform: translateX(-50%) scale(1.08);
    }
}

/* Hide leftover page editor content after the donation form */
.ghy-donation-wrap~* {
    display: none !important;
}

/* Remove excess whitespace below the donation form */
body:has(.ghy-donation-wrap),
body:has(.ghy-donation-wrap) #page,
body:has(.ghy-donation-wrap) #primary,
body:has(.ghy-donation-wrap) .content-area,
body:has(.ghy-donation-wrap) .site-main,
body:has(.ghy-donation-wrap) .entry-content,
body:has(.ghy-donation-wrap) .container {
    min-height: unset !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    height: auto !important;
}

/* ── Subtle glass-card for the form ─────────────────── */
.ghy-donation-form {
    background: linear-gradient(145deg, rgba(30, 25, 15, 0.6), rgba(15, 12, 8, 0.8));
    border: 1px solid rgba(203, 155, 81, 0.15);
    border-radius: 16px;
    padding: 30px 28px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3), 0 0 60px rgba(203, 155, 81, 0.04);
    position: relative;
    overflow: hidden;
}

/* Warm glow accent at top of form card */
.ghy-donation-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(203, 155, 81, 0.5), rgba(246, 226, 122, 0.6), rgba(203, 155, 81, 0.5), transparent);
}

/* ── Donate page description text readability ───────── */
body:has(.ghy-donation-wrap) .entry-content>h3,
body:has(.ghy-donation-wrap) .entry-content>p {
    letter-spacing: 1.5px !important;
    font-weight: normal !important;
    line-height: 1.8 !important;
    text-align: center !important;
}

/* ── Notice banners ───────────────────────────────────── */
.ghy-notice {
    padding: 12px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-family: 'DellaRespira-Regular', serif;
    letter-spacing: 1px;
    font-size: 14px;
}

.ghy-notice-error {
    background: rgba(180, 50, 50, 0.15);
    border: 1px solid rgba(220, 80, 80, 0.5);
    color: #e57373;
}

.ghy-notice-test {
    background: rgba(180, 140, 30, 0.15);
    border: 1px solid rgba(220, 180, 60, 0.5);
    color: #f6e27a;
    text-align: center;
    font-size: 13px;
}

/* ── Form ─────────────────────────────────────────────── */
.ghy-donation-form {
    background: linear-gradient(145deg, rgba(25, 22, 15, 0.97), rgba(12, 10, 6, 0.99));
    border: 1px solid rgba(203, 155, 81, 0.4);
    border-radius: 16px;
    padding: 36px 40px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.6), 0 0 80px rgba(203, 155, 81, 0.08);
}

@media (max-width: 600px) {
    .ghy-donation-form {
        padding: 24px 20px;
    }
}

/* ── Field rows ───────────────────────────────────────── */
.ghy-form-row {
    margin-bottom: 20px;
}

.ghy-form-row--two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 560px) {
    .ghy-form-row--two {
        grid-template-columns: 1fr;
    }
}

.ghy-field {
    margin-bottom: 20px;
}

/* ── Labels ───────────────────────────────────────────── */
.ghy-label {
    display: block;
    margin-bottom: 8px;
    font-family: 'DellaRespira-Regular', serif;
    font-size: 13px;
    letter-spacing: 3px;
    font-weight: bold;
    background-image: linear-gradient(to right, #866634 0, #cb9b51 2%, #ddc027 45%, #7e7823 50%, #f6e27a 55%, #cb9b51 78%, #462523 100%) !important;
    color: transparent !important;
    -webkit-background-clip: text;
    background-clip: text;
}

.ghy-required {
    color: #e57373 !important;
    background: none !important;
    -webkit-background-clip: unset !important;
}

.ghy-optional {
    color: rgba(203, 155, 81, 0.5) !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    font-size: 11px;
    letter-spacing: 1px;
}

/* ── Inputs ───────────────────────────────────────────── */
.ghy-input,
.ghy-textarea {
    width: 100%;
    box-sizing: border-box;
    background: linear-gradient(145deg, rgba(25, 22, 15, 0.95), rgba(15, 12, 8, 0.98)) !important;
    border: 2px solid #cb9b51 !important;
    border-radius: 8px !important;
    color: #e8d48b !important;
    font-family: 'DellaRespira-Regular', Georgia, serif !important;
    font-size: 15px !important;
    padding: 12px 15px !important;
    outline: none !important;
    box-shadow: 0 0 15px rgba(203, 155, 81, 0.15), inset 0 0 20px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.3s ease !important;
}

.ghy-input:focus,
.ghy-textarea:focus {
    border-color: #f6e27a !important;
    box-shadow: 0 0 25px rgba(246, 226, 122, 0.35), inset 0 0 20px rgba(0, 0, 0, 0.2) !important;
}

.ghy-input::placeholder,
.ghy-textarea::placeholder {
    color: rgba(203, 155, 81, 0.4) !important;
}

.ghy-textarea {
    min-height: 110px;
    resize: vertical;
}

/* ── Amount presets ───────────────────────────────────── */
.ghy-amount-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.ghy-preset-btn {
    padding: 8px 18px;
    border-radius: 8px;
    border: 2px solid #cb9b51;
    background: transparent;
    color: #cb9b51;
    font-family: 'DellaRespira-Regular', serif;
    font-size: 14px;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-weight: bold;
}

.ghy-preset-btn:hover,
.ghy-preset-active {
    background: linear-gradient(to right, #462523 0, #cb9b51 22%, #f6e27a 45%, #f6f2c0 50%, #f6e27a 55%, #cb9b51 78%, #462523 100%);
    border-color: transparent;
    color: #1a1510;
    box-shadow: 0 4px 15px rgba(203, 155, 81, 0.4);
}

.ghy-custom-amount {
    position: relative;
    display: flex;
    align-items: center;
}

.ghy-currency-symbol {
    position: absolute;
    left: 15px;
    color: #cb9b51;
    font-size: 16px;
    font-family: 'DellaRespira-Regular', serif;
    pointer-events: none;
    z-index: 1;
}

input.ghy-input.ghy-amount-input {
    padding-left: 45px !important;
}

/* ── Errors ───────────────────────────────────────────── */
.ghy-error {
    display: block;
    color: #e57373;
    font-size: 12px;
    margin-top: 5px;
    letter-spacing: 1px;
    min-height: 16px;
}

/* ── Submit button ────────────────────────────────────── */
.ghy-submit-wrap {
    text-align: center;
    margin-top: 30px;
}

.ghy-donate-btn {
    display: inline-block;
    min-width: 220px;
    padding: 16px 40px;
    font-family: 'DellaRespira-Regular', serif;
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 3px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    background-image: linear-gradient(to right, #462523 0, #cb9b51 22%, #f6e27a 45%, #f6f2c0 50%, #f6e27a 55%, #cb9b51 78%, #462523 100%);
    color: #1a1510;
    box-shadow: 0 4px 20px rgba(203, 155, 81, 0.4);
    transition: all 0.3s ease;
    animation: ghyPulse 3s infinite;
}

.ghy-donate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(246, 226, 122, 0.6);
    animation: none;
}

.ghy-donate-btn:active {
    transform: translateY(-1px);
}

.ghy-donate-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    animation: none;
}

.ghy-secure-notice {
    margin-top: 12px !important;
    font-size: 12px !important;
    letter-spacing: 2px !important;
    color: rgba(203, 155, 81, 0.5) !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
}

/* ── Success message ─────────────────────────────────── */
.ghy-success-message {
    text-align: center;
    padding: 50px 30px;
    animation: ghyFadeUp 0.8s ease-out both;
}

.ghy-success-icon {
    font-size: 56px;
    background-image: linear-gradient(to right, #462523 0, #cb9b51 22%, #f6e27a 45%, #f6f2c0 50%, #f6e27a 55%, #cb9b51 78%, #462523 100%);
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    margin-bottom: 24px;
    animation: ghyAmbientBreath 4s ease-in-out infinite;
}

.ghy-success-title {
    font-family: 'DellaRespira-Regular', serif;
    font-size: 22px !important;
    letter-spacing: 4px !important;
    background-image: linear-gradient(to right, #462523 0, #cb9b51 22%, #f6e27a 45%, #f6f2c0 50%, #f6e27a 55%, #cb9b51 78%, #462523 100%) !important;
    color: transparent !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    margin-bottom: 16px !important;
}

.ghy-success-text {
    letter-spacing: 2px !important;
    font-size: 15px !important;
    line-height: 2 !important;
}

.ghy-receipt-info {
    font-size: 12px !important;
    color: rgba(203, 155, 81, 0.5) !important;
    letter-spacing: 1px !important;
    margin-top: 10px !important;
    background: none !important;
    -webkit-background-clip: unset !important;
}

/* ── PayPal Section ───────────────────────────────────── */
#ghy-paypal-section {
    margin-top: 20px;
}

.ghy-paypal-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.ghy-paypal-divider::before,
.ghy-paypal-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(203, 155, 81, 0.4), transparent);
}

.ghy-paypal-divider span {
    font-family: 'DellaRespira-Regular', serif;
    font-size: 12px;
    letter-spacing: 3px;
    color: rgba(203, 155, 81, 0.6);
    white-space: nowrap;
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
}

/* Keep PayPal buttons from appearing huge */
#ghy-paypal-button-container {
    max-width: 400px;
    margin: 0 auto;
}

/* Secure notice under PayPal buttons */
#ghy-paypal-section .ghy-secure-notice {
    text-align: center;
    margin-top: 16px !important;
}