/**
 * WooCommerce First Purchase Coupon - Frontend Styles
 */

.fpc-wrapper {
    width: 100%;
    max-width: 540px;
    margin: 32px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", sans-serif;
    color: #1e293b;
    box-sizing: border-box;
}

.fpc-wrapper * {
    box-sizing: border-box;
}

.fpc-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 36px 32px;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.fpc-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #4f46e5, #8b5cf6, #ec4899);
}

/* Header */
.fpc-header {
    text-align: center;
    margin-bottom: 24px;
}

.fpc-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eef2ff;
    color: #4338ca;
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
}

.fpc-title {
    margin: 0 0 8px 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    color: #0f172a;
}

.fpc-subtitle {
    margin: 0;
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
}

/* Alert Notification */
.fpc-alert {
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    animation: fpcFadeIn 0.3s ease-out;
}

.fpc-alert.fpc-alert-error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.fpc-alert.fpc-alert-success {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.fpc-alert.fpc-alert-info {
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

/* Fields */
.fpc-field-group {
    margin-bottom: 20px;
}

.fpc-label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.fpc-required {
    color: #ef4444;
}

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

.fpc-input-icon {
    position: absolute;
    left: 14px;
    font-size: 16px;
    pointer-events: none;
    opacity: 0.7;
}

.fpc-input {
    width: 100%;
    padding: 13px 16px 13px 44px;
    font-size: 15px;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    background-color: #f8fafc;
    color: #0f172a;
    outline: none;
    transition: all 0.2s ease;
}

.fpc-input:focus {
    border-color: #6366f1;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.fpc-code-input {
    letter-spacing: 4px;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 18px;
    text-align: center;
    padding-left: 16px;
}

.fpc-help-text {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #64748b;
}

/* Buttons */
.fpc-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 15.5px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.fpc-btn-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

.fpc-btn-primary:hover {
    background: linear-gradient(135deg, #4338ca 0%, #4f46e5 100%);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.45);
    transform: translateY(-1px);
}

.fpc-btn-primary:active {
    transform: translateY(0);
}

.fpc-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.fpc-btn-shop {
    background: #0f172a;
    color: #ffffff;
    margin-top: 16px;
}

.fpc-btn-shop:hover {
    background: #1e293b;
    color: #ffffff;
}

.fpc-link-btn {
    background: none;
    border: none;
    color: #64748b;
    font-size: 13px;
    cursor: pointer;
    margin-top: 14px;
    text-align: center;
    width: 100%;
    padding: 6px;
    transition: color 0.2s ease;
}

.fpc-link-btn:hover {
    color: #4f46e5;
    text-decoration: underline;
}

/* Step 2 Styles */
.fpc-step2-intro {
    text-align: center;
    margin-bottom: 22px;
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
}

.fpc-mail-anim {
    font-size: 32px;
    margin-bottom: 6px;
    animation: fpcBounce 2s infinite;
}

.fpc-step2-intro h4 {
    margin: 0 0 6px 0;
    font-size: 16px;
    color: #0f172a;
}

.fpc-step2-intro p {
    margin: 0;
    font-size: 13.5px;
    color: #64748b;
    line-height: 1.4;
}

/* Success Card & Coupon Ticket */
.fpc-success-content {
    text-align: center;
}

.fpc-celebrate-icon {
    font-size: 48px;
    margin-bottom: 10px;
    animation: fpcPop 0.5s ease-out;
}

.fpc-success-title {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
}

.fpc-success-desc {
    margin: 0 0 20px 0;
    font-size: 14px;
    color: #64748b;
}

.fpc-coupon-ticket {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 2px dashed #86efac;
    border-radius: 16px;
    padding: 24px;
    position: relative;
    margin: 20px 0;
}

.fpc-ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.fpc-ticket-tag {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #166534;
}

.fpc-ticket-badge {
    background: #22c55e;
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 700;
}

.fpc-coupon-code-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #ffffff;
    border: 1px solid #dcfce7;
    border-radius: 12px;
    padding: 14px 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

.fpc-coupon-code-val {
    font-family: 'Courier New', Courier, monospace;
    font-size: 28px;
    font-weight: 800;
    color: #15803d;
    letter-spacing: 4px;
}

.fpc-btn-copy {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #4f46e5;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fpc-btn-copy:hover {
    background: #4338ca;
}

.fpc-ticket-footer {
    margin-top: 14px;
    font-size: 12px;
    color: #166534;
    font-weight: 500;
}

/* Utilities & Animations */
.fpc-hidden {
    display: none !important;
}

.fpc-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: fpcSpin 0.7s linear infinite;
}

@keyframes fpcSpin {
    to { transform: rotate(360deg); }
}

@keyframes fpcFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fpcPop {
    0% { transform: scale(0.6); opacity: 0; }
    70% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); }
}

@keyframes fpcBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}
