/**
 * LiteHelpDesk Waitlist - Frontend Stylesheet
 */

:root {
    --lhd-primary: #fa5002;
    --lhd-primary-hover: #e04702;
    --lhd-accent: #ff6b53;
    --lhd-bg-card: #ffffff;
    --lhd-text-main: #18181b;
    --lhd-text-muted: #78716c;
    --lhd-border: #ebe5e0;
    --lhd-border-focus: #fa5002;
    --lhd-ring: rgba(250, 80, 2, 0.2);
    --lhd-success-bg: #ecfdf5;
    --lhd-success-border: #a7f3d0;
    --lhd-success-text: #065f46;
    --lhd-error-bg: #fef2f2;
    --lhd-error-border: #fecaca;
    --lhd-error-text: #991b1b;
}

.lhd-waitlist-container {
    box-sizing: border-box;
    width: 100%;
    max-width: 540px;
    margin: 2rem auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--lhd-text-main);
}

.lhd-waitlist-container *,
.lhd-waitlist-container *::before,
.lhd-waitlist-container *::after {
    box-sizing: inherit;
}

/* Card Wrapper */
.lhd-waitlist-card {
    background: var(--lhd-bg-card);
    border: 1px solid var(--lhd-border);
    border-radius: 20px;
    padding: 2.25rem 2rem;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.05), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
    position: relative;
    overflow: hidden;
    transition: all 0.25s ease;
}

/* Header */
.lhd-waitlist-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.lhd-waitlist-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 9999px;
    background: rgba(79, 70, 229, 0.08);
    color: var(--lhd-primary);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 1rem;
}

.lhd-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--lhd-accent);
    position: relative;
    display: inline-block;
}

.lhd-pulse-dot::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: var(--lhd-accent);
    animation: lhd-pulse 2s infinite ease-out;
}

@keyframes lhd-pulse {
    0% {
        transform: scale(1);
        opacity: 0.9;
    }
    100% {
        transform: scale(2.6);
        opacity: 0;
    }
}

.lhd-waitlist-title {
    font-size: 1.625rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--lhd-text-main);
    margin: 0 0 0.5rem 0;
}

.lhd-waitlist-subtitle {
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--lhd-text-muted);
    margin: 0;
}

/* Form Styles */
.lhd-form-group {
    margin-bottom: 1.125rem;
    text-align: left;
}

.lhd-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--lhd-text-main);
    margin-bottom: 0.375rem;
}

.lhd-required {
    color: #ef4444;
}

.lhd-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.lhd-input-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: #94a3b8;
    pointer-events: none;
    transition: color 0.2s ease;
}

.lhd-input {
    width: 100%;
    height: 48px;
    padding: 0 1rem 0 2.65rem;
    font-size: 0.9375rem;
    line-height: normal;
    color: var(--lhd-text-main);
    background-color: #f8fafc;
    border: 1.5px solid var(--lhd-border);
    border-radius: 12px;
    transition: all 0.2s ease;
    outline: none;
}

.lhd-input::placeholder {
    color: #94a3b8;
}

.lhd-input:focus {
    background-color: #ffffff;
    border-color: var(--lhd-border-focus);
    box-shadow: 0 0 0 3.5px var(--lhd-ring);
}

.lhd-input:focus + .lhd-input-icon,
.lhd-input-wrapper:focus-within .lhd-input-icon {
    color: var(--lhd-primary);
}

/* Messages */
.lhd-form-messages {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.875rem;
    margin-bottom: 1.125rem;
    line-height: 1.45;
}

.lhd-form-messages.lhd-msg-error {
    background-color: var(--lhd-error-bg);
    border: 1px solid var(--lhd-error-border);
    color: var(--lhd-error-text);
}

.lhd-form-messages.lhd-msg-success {
    background-color: var(--lhd-success-bg);
    border: 1px solid var(--lhd-success-border);
    color: var(--lhd-success-text);
}

/* Submit Button */
.lhd-form-actions {
    margin-top: 1.25rem;
}

.lhd-submit-btn {
    width: 100%;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #fa5002;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(250, 80, 2, 0.25);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.lhd-submit-btn:hover {
    background: #e04702;
    box-shadow: 0 6px 20px rgba(250, 80, 2, 0.35);
    transform: translateY(-1px);
}

.lhd-submit-btn:active {
    transform: translateY(0);
}

.lhd-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.lhd-btn-arrow {
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease;
}

.lhd-submit-btn:hover .lhd-btn-arrow {
    transform: translateX(3px);
}

/* Spinner */
.lhd-spin-svg {
    animation: lhd-spin 1s linear infinite;
    width: 18px;
    height: 18px;
}

@keyframes lhd-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Footer / Disclaimer */
.lhd-form-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.8125rem;
    color: var(--lhd-text-muted);
    margin-top: 1rem;
}

/* Success View */
.lhd-waitlist-success {
    text-align: center;
    padding: 1.5rem 0.5rem;
    animation: lhd-fade-in 0.3s ease-out forwards;
}

@keyframes lhd-fade-in {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lhd-success-icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.25);
}

.lhd-success-icon-wrap svg {
    width: 32px;
    height: 32px;
}

.lhd-success-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--lhd-text-main);
    margin: 0 0 0.5rem;
}

.lhd-success-msg {
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--lhd-text-muted);
    margin: 0;
    max-width: 420px;
    margin: 0 auto;
}

/* Dark Theme variant */
.lhd-theme-dark .lhd-waitlist-card {
    background: #0f172a;
    border-color: #1e293b;
    color: #f8fafc;
}

.lhd-theme-dark .lhd-waitlist-title,
.lhd-theme-dark .lhd-label,
.lhd-theme-dark .lhd-success-title {
    color: #f8fafc;
}

.lhd-theme-dark .lhd-waitlist-subtitle,
.lhd-theme-dark .lhd-form-footer,
.lhd-theme-dark .lhd-success-msg {
    color: #94a3b8;
}

.lhd-theme-dark .lhd-input {
    background-color: #1e293b;
    border-color: #334155;
    color: #f8fafc;
}

.lhd-theme-dark .lhd-input::placeholder {
    color: #64748b;
}

.lhd-theme-dark .lhd-waitlist-badge {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
}
