/* George the Gatekeeper – Front-end styles */

.gtg-form-wrap {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.gtg-form-wrap h2 {
    margin: 0 0 1.25rem;
    font-size: 1.5rem;
    text-align: center;
}

.gtg-form-row {
    display: flex;
    gap: 1rem;
}

.gtg-form-row .gtg-form-field {
    flex: 1;
}

.gtg-form label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 600;
    font-size: 0.9rem;
}

@media (max-width: 500px) {
    .gtg-form-row {
        flex-direction: column;
        gap: 0;
    }
}

.gtg-form input[type="text"],
.gtg-form input[type="email"],
.gtg-form input[type="password"],
.gtg-form input[type="file"] {
    width: 100%;
    padding: 0.6rem 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.95rem;
    box-sizing: border-box;
}

.gtg-form input[type="file"] {
    padding: 0.4rem;
}

.gtg-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: normal;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.gtg-btn {
    display: block;
    width: 100%;
    padding: 0.7rem;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.gtg-btn:hover {
    background: #005f8d;
}

/* Messages */
.gtg-errors p {
    color: #d63638;
    background: #fcecec;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
}

.gtg-success p {
    color: #00a32a;
    background: #ecfcef;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.gtg-message {
    text-align: center;
    font-size: 0.95rem;
}

.gtg-message a {
    color: #0073aa;
}

/* User Card */
.gtg-user-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
}

.gtg-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.gtg-user-name {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
    color: #fff;
}

.gtg-logout-link {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    margin-left: auto;
}

.gtg-logout-link:hover {
    color: #fff;
    text-decoration: underline;
}

.gtg-auth-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
}

.gtg-auth-link:hover {
    text-decoration: underline;
}

/* Favorite Button – aggressive reset to override Bricks/theme styles */
.gtg-fav-btn,
.gtg-fav-btn:hover,
.gtg-fav-btn:focus,
.gtg-fav-btn:active {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    padding: 6px !important;
    margin: 0;
    cursor: pointer;
    color: #aaa;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    appearance: none;
    line-height: 1;
}

.gtg-fav-btn:hover {
    color: #e74c3c !important;
}

.gtg-fav-btn .gtg-heart-icon {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    transition: transform 0.2s ease;
}

.gtg-fav-btn:hover .gtg-heart-icon {
    transform: scale(1.12);
}

/* Favorited state (red filled heart) */
.gtg-fav-btn.is-favorited,
.gtg-fav-btn.is-favorited:hover {
    color: #e74c3c !important;
}

.gtg-fav-btn.is-favorited .gtg-heart-icon {
    fill: #e74c3c;
    stroke: #e74c3c;
}

/* The bounce animation – triggered via .gtg-fav-animating class */
.gtg-fav-btn.gtg-fav-animating .gtg-heart-icon {
    animation: gtg-heart-bounce 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.gtg-fav-btn.gtg-fav-loading {
    pointer-events: none;
    opacity: 0.7;
}

/* Heart shrinks small, then bounces up big, settles at normal */
@keyframes gtg-heart-bounce {
    0%   { transform: scale(1); }
    15%  { transform: scale(0.4); }
    40%  { transform: scale(1.4); }
    60%  { transform: scale(0.9); }
    80%  { transform: scale(1.15); }
    100% { transform: scale(1); }
}

/* Particle Burst Container */
.gtg-fav-particles {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    pointer-events: none;
    z-index: 1;
}

/* Glitter dots */
.gtg-fav-particle {
    position: absolute;
    display: block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #e74c3c;
    opacity: 0;
    transform: translate(-50%, -50%);
}

/* Glitter mini-hearts */
.gtg-fav-particle--heart {
    width: auto;
    height: auto;
    background: none !important;
    font-size: 11px;
    line-height: 1;
    color: #e74c3c;
}

/* Alternate glitter colors for sparkle variety */
.gtg-fav-particle:nth-child(2) { background: #ff6b6b; }
.gtg-fav-particle:nth-child(4) { background: #ff8787; }
.gtg-fav-particle:nth-child(6) { background: #ffa8a8; }
.gtg-fav-particle--heart:nth-child(3) { color: #ff6b6b; }
.gtg-fav-particle--heart:nth-child(7) { color: #ff8787; }

.gtg-fav-particle.animate {
    animation: gtg-burst 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

@keyframes gtg-burst {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) rotate(var(--angle)) translateY(0) scale(0);
    }
    30% {
        opacity: 1;
        transform: translate(-50%, -50%) rotate(var(--angle)) translateY(calc(var(--distance) * -0.5)) scale(1.2);
    }
    70% {
        opacity: 0.8;
        transform: translate(-50%, -50%) rotate(var(--angle)) translateY(calc(var(--distance) * -1)) scale(0.8);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) rotate(var(--angle)) translateY(calc(var(--distance) * -1.3)) scale(0);
    }
}
