*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f1f5f9;
    min-height: 100vh;
    display: flex;
    padding: 20px;
}

/* margin: auto centers the wrapper both ways but, unlike align-items/justify-content
   center on the body, collapses to 0 when the content is taller than the viewport —
   otherwise the overflow is pushed above the top edge where it can't be scrolled to. */
.lp-page-wrapper {
    width: 100%;
    max-width: 480px;
    margin: auto;
}

/* Environment banner (dev/staging/demo): pin across the top instead of being
   pulled into the centered flex layout of the body. */
.bg-danger.col-12 {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.lp-logo {
    text-align: center;
    margin-bottom: 24px;
}

.lp-logo img {
    max-height: 80px;
    max-width: 320px;
}

.lp-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.lp-card-header {
    padding: 28px 32px 0;
    text-align: center;
}

.lp-card-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
}

.lp-card-header p {
    font-size: 0.9rem;
    color: #6b7280;
    margin-top: 6px;
}

.lp-card-body {
    padding: 28px 32px 32px;
}

.lp-input-group {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.lp-input {
    flex: 1;
    padding: 12px 16px;
    font-size: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s;
    color: #1a1a2e;
}

.lp-input:focus {
    border-color: #334155;
}

.lp-input::placeholder {
    color: #9ca3af;
}

.lp-btn {
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: #334155;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    white-space: nowrap;
}

.lp-btn:hover {
    opacity: 0.9;
}

.lp-btn:active {
    transform: scale(0.97);
}

.lp-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.lp-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: lp-spin 0.6s linear infinite;
    vertical-align: middle;
}

@keyframes lp-spin {
    to { transform: rotate(360deg); }
}

.lp-error {
    margin-top: 12px;
    padding: 10px 14px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #dc2626;
    font-size: 0.875rem;
    text-align: center;
}

.lp-results {
    margin-top: 4px;
    text-align: center;
}

.lp-balance-display {
    text-align: center;
    padding: 20px 0;
    border-bottom: 1px solid #f3f4f6;
    margin-bottom: 20px;
}

.lp-balance-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6b7280;
    margin-bottom: 4px;
}

.lp-balance-amount {
    font-size: 2.5rem;
    font-weight: 800;
    color: #059669;
}

.lp-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.925rem;
}

.lp-detail-row:last-child {
    border-bottom: none;
}

.lp-detail-label {
    color: #6b7280;
    font-weight: 500;
}

.lp-detail-value {
    color: #1a1a2e;
    font-weight: 600;
    text-align: right;
}

/* Loading state (shown while validating the email link) */
.lp-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 48px 32px;
}

.lp-loading-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid #e5e7eb;
    border-top-color: #334155;
    border-radius: 50%;
    animation: lp-spin 0.7s linear infinite;
}

.lp-loading-message {
    color: #6b7280;
    font-size: 0.95rem;
}

.lp-link-sent-message,
.lp-not-found-message {
    color: #1a1a2e;
    font-size: 0.95rem;
    text-align: center;
    margin: 8px 0 4px;
}

.lp-back-link {
    display: inline-block;
    margin: 20px auto 0;
    padding: 0.55rem 1.25rem;
    border: 1px solid #334155;
    border-radius: 8px;
    color: #334155;
    background: transparent;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.lp-back-link:hover,
.lp-back-link:focus {
    background: #334155;
    color: #fff;
    text-decoration: none;
}

.lp-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.85rem;
    color: #6b7280;
}

.lp-hidden {
    display: none !important;
}

.lp-lang-select {
    min-width: 140px;
    width: auto;
}

@media (max-width: 500px) {
    .lp-input-group {
        flex-direction: column;
    }

    .lp-card-body {
        padding: 20px;
    }

    .lp-balance-amount {
        font-size: 2rem;
    }
}
