/* ==========================================================================
   Pixela Email PDF — Form Styles
   Premium glassmorphism card with micro-animations
   ========================================================================== */

/* Google Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ---------- Wrapper ---------- */
.pixela-email-pdf-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Card ---------- */
.pixela-email-pdf-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    padding: 48px 36px 36px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 24px;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 20px 50px -12px rgba(102, 126, 234, 0.15),
        0 0 0 1px rgba(102, 126, 234, 0.05);
    text-align: center;
    overflow: hidden;
    transition: box-shadow 0.4s ease, transform 0.4s ease;
}

.pixela-email-pdf-card:hover {
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.07),
        0 25px 60px -12px rgba(102, 126, 234, 0.25),
        0 0 0 1px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

/* ---------- Card glow ---------- */
.pixela-card-glow {
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ---------- Particles ---------- */
.pixela-card-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.pixela-card-particles span {
    position: absolute;
    width: 4px;
    height: 4px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    opacity: 0;
    animation: pixela-float 6s infinite ease-in-out;
}

.pixela-card-particles span:nth-child(1) { left: 10%; animation-delay: 0s; }
.pixela-card-particles span:nth-child(2) { left: 30%; animation-delay: 1.2s; }
.pixela-card-particles span:nth-child(3) { left: 50%; animation-delay: 2.4s; }
.pixela-card-particles span:nth-child(4) { left: 70%; animation-delay: 3.6s; }
.pixela-card-particles span:nth-child(5) { left: 90%; animation-delay: 4.8s; }

@keyframes pixela-float {
    0%, 100% { opacity: 0; transform: translateY(100%) scale(0); }
    10% { opacity: 0.6; }
    50% { opacity: 0.3; transform: translateY(-200px) scale(1); }
    100% { opacity: 0; transform: translateY(-400px) scale(0.5); }
}

/* ---------- PDF Icon ---------- */
.pixela-pdf-icon {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border-radius: 20px;
    transition: transform 0.3s ease;
}

.pixela-email-pdf-card:hover .pixela-pdf-icon {
    transform: scale(1.05) rotate(-2deg);
}

/* ---------- Typography ---------- */
.pixela-form-title {
    position: relative;
    z-index: 1;
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.pixela-form-subtitle {
    position: relative;
    z-index: 1;
    margin: 0 0 28px;
    font-size: 14px;
    font-weight: 400;
    color: #6b7280;
    line-height: 1.5;
}

/* ---------- Form ---------- */
.pixela-email-form {
    position: relative;
    z-index: 1;
}

/* ---------- Input group ---------- */
.pixela-input-group {
    margin-bottom: 16px;
    text-align: left;
}

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

.pixela-input-icon {
    position: absolute;
    left: 16px;
    z-index: 2;
    color: #9ca3af;
    pointer-events: none;
    transition: color 0.3s ease;
}

.pixela-email-input {
    width: 100%;
    padding: 14px 16px 14px 46px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 400;
    color: #1a1a2e;
    background: rgba(255, 255, 255, 0.9);
    border: 1.5px solid #e5e7eb;
    border-radius: 14px;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    box-sizing: border-box;
}

.pixela-email-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.pixela-email-input:focus {
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.pixela-email-input:focus ~ .pixela-input-icon,
.pixela-input-wrapper:focus-within .pixela-input-icon {
    color: #667eea;
}

.pixela-field-error {
    margin: 6px 0 0 4px;
    font-size: 12px;
    color: #ef4444;
    font-weight: 500;
}

/* ---------- Consent checkbox ---------- */
.pixela-consent-group {
    margin-bottom: 20px;
    text-align: left;
}

.pixela-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
}

.pixela-consent-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.pixela-checkmark {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    background: rgba(255, 255, 255, 0.9);
    border: 1.5px solid #d1d5db;
    border-radius: 6px;
    transition: all 0.25s ease;
}

.pixela-checkmark svg {
    opacity: 0;
    transform: scale(0);
    transition: all 0.25s ease;
}

.pixela-consent-checkbox:checked + .pixela-checkmark {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.pixela-consent-checkbox:checked + .pixela-checkmark svg {
    opacity: 1;
    transform: scale(1);
}

.pixela-consent-checkbox:focus + .pixela-checkmark {
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.pixela-consent-text {
    padding-top: 1px;
}

/* ---------- Submit button ---------- */
.pixela-submit-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.pixela-submit-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 14px;
}

.pixela-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
}

.pixela-submit-btn:hover::before {
    opacity: 1;
}

.pixela-submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.pixela-btn-text,
.pixela-btn-arrow {
    position: relative;
    z-index: 1;
}

.pixela-btn-arrow {
    display: flex;
    transition: transform 0.3s ease;
}

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

.pixela-btn-loader {
    display: none;
    position: relative;
    z-index: 1;
}

/* Loading state */
.pixela-submit-btn.is-loading {
    pointer-events: none;
    opacity: 0.85;
}

.pixela-submit-btn.is-loading .pixela-btn-text,
.pixela-submit-btn.is-loading .pixela-btn-arrow {
    display: none;
}

.pixela-submit-btn.is-loading .pixela-btn-loader {
    display: flex;
}

/* ---------- Messages ---------- */
.pixela-message {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    animation: pixela-message-in 0.4s ease;
}

.pixela-message-success {
    color: #059669;
    background: rgba(5, 150, 105, 0.08);
    border: 1px solid rgba(5, 150, 105, 0.15);
}

.pixela-message-error {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.15);
}

.pixela-message svg {
    flex-shrink: 0;
}

@keyframes pixela-message-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ---------- Privacy note ---------- */
.pixela-privacy-note {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 20px 0 0;
    font-size: 11px;
    color: #9ca3af;
    font-weight: 400;
}

.pixela-privacy-note svg {
    flex-shrink: 0;
}

/* ---------- Success state — hide form ---------- */
.pixela-email-pdf-wrapper.is-success .pixela-email-form {
    display: none;
}

.pixela-email-pdf-wrapper.is-success .pixela-consent-group {
    display: none;
}

/* ---------- Dark mode support ---------- */
@media (prefers-color-scheme: dark) {
    .pixela-email-pdf-card {
        background: rgba(30, 30, 50, 0.85);
        border-color: rgba(255, 255, 255, 0.08);
        box-shadow:
            0 4px 6px -1px rgba(0, 0, 0, 0.2),
            0 20px 50px -12px rgba(102, 126, 234, 0.2),
            0 0 0 1px rgba(102, 126, 234, 0.1);
    }

    .pixela-form-title {
        color: #f0f0f5;
    }

    .pixela-form-subtitle,
    .pixela-consent-label {
        color: #9ca3af;
    }

    .pixela-email-input {
        color: #f0f0f5;
        background: rgba(255, 255, 255, 0.06);
        border-color: rgba(255, 255, 255, 0.12);
    }

    .pixela-email-input::placeholder {
        color: #6b7280;
    }

    .pixela-email-input:focus {
        background: rgba(255, 255, 255, 0.1);
        border-color: #667eea;
    }

    .pixela-checkmark {
        background: rgba(255, 255, 255, 0.06);
        border-color: rgba(255, 255, 255, 0.15);
    }
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
    .pixela-email-pdf-wrapper {
        padding: 20px 16px;
    }

    .pixela-email-pdf-card {
        padding: 36px 24px 28px;
        border-radius: 20px;
    }

    .pixela-form-title {
        font-size: 20px;
    }

    .pixela-form-subtitle {
        font-size: 13px;
    }
}
