/* Premium Flashcard System - site/css/premium-flashcard.css */

:root {
    --f-primary: #086fff;
    --f-secondary: #112A46;
    --f-text-muted: #9ca3af;
    --f-bg-card: #ffffff;
    --f-border: #e5e7eb;
    --f-error: #ef4444;
    --f-success: #10b981;
    --f-shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --f-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --f-shadow-active: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.flashcard-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    position: relative;
    padding-bottom: 20px;
}

/* Progress Indicator */
.f-progress-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 24px;
}

.f-progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--f-border);
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.f-progress-dot.active {
    background-color: var(--f-primary);
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(8, 111, 255, 0.3);
}

.f-progress-dot.completed {
    background-color: #12A0FF;
}

/* Stack Container */
.f-stack-container {
    position: relative;
    width: 100%;
    height: 380px;
    /* Fixed height for the stack area */
    perspective: 1200px;
    margin-bottom: 2rem;
}

/* Flashcard Base */
.f-card {
    position: absolute;
    inset: 0;
    background-color: var(--f-bg-card);
    border-radius: 24px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid var(--f-border);
    box-shadow: var(--f-shadow-card);
    transform-origin: center bottom;
    transition: transform 350ms cubic-bezier(0.25, 1, 0.5, 1),
        box-shadow 350ms cubic-bezier(0.25, 1, 0.5, 1),
        filter 350ms cubic-bezier(0.25, 1, 0.5, 1);
    opacity: 1 !important;
    pointer-events: none;
    backface-visibility: hidden;
}

/* Icons */
.f-card-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    text-align: center;
    color: var(--f-primary);
}

.f-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--f-secondary);
    margin-bottom: 0.5rem;
    text-align: center;
    font-family: 'Poppins', sans-serif;
}

.f-card-text {
    font-size: 1rem;
    color: var(--f-text-muted);
    text-align: center;
    margin-bottom: 1.5rem;
    font-family: 'Poppins', sans-serif;
}

/* Stack States */
.f-card-prev {
    transform: translate3d(-150%, 0, -200px) scale(0.6);
    z-index: 0;
    box-shadow: none;
}

.f-card-active {
    transform: translate3d(0, 0, 0) scale(1);
    z-index: 100;
    pointer-events: auto;
    box-shadow: var(--f-shadow-active);
}

.f-card-next-1 {
    transform: translate3d(0, 15px, -50px) scale(0.95);
    z-index: 90;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.f-card-next-2 {
    transform: translate3d(0, 30px, -100px) scale(0.90);
    z-index: 80;
    box-shadow: 0 5px 10px -3px rgba(0, 0, 0, 0.03);
}

.f-card-next-3 {
    transform: translate3d(0, 45px, -150px) scale(0.85);
    z-index: 70;
}

.f-card-hidden {
    transform: translate3d(0, 60px, -200px) scale(0.80);
    z-index: 10;
    box-shadow: none;
}

/* Form Inputs */
.f-input-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
    position: relative;
    width: 100%;
}

.f-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    font-family: 'Poppins', sans-serif;
}

.f-input,
.f-select {
    width: 100%;
    background: #f9fafb;
    border: 1px solid var(--f-border);
    border-radius: 12px;
    padding: 14px;
    color: var(--f-secondary);
    font-size: 1rem;
    transition: all 0.2s ease;
    font-family: 'Poppins', sans-serif;
    outline: none;
}

.f-input:focus,
.f-select:focus {
    border-color: var(--f-primary);
    box-shadow: 0 0 0 2px rgba(8, 111, 255, 0.2);
}

/* Specialized Inputs */
.f-phone-container {
    display: flex;
    gap: 8px;
    width: 100%;
}

.f-phone-prefix {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    border: 1px solid var(--f-border);
    border-radius: 12px;
    padding: 0 12px;
    color: #6b7280;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
}

/* Error Message */
.f-error-msg {
    color: var(--f-error);
    font-size: 0.75rem;
    margin-top: 5px;
    font-weight: 500;
    display: none;
}

.f-input-group.invalid .f-input,
.f-input-group.invalid .f-select {
    border-color: var(--f-error);
}

.f-input-group.invalid .f-error-msg {
    display: block;
}

/* Animations */
@keyframes f-shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.f-invalid-shake {
    animation: f-shake 0.3s cubic-bezier(.36, .07, .19, .97) both;
}

/* Buttons */
.f-nav-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.f-btn {
    padding: 12px 24px;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: 'Poppins', sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.f-btn-primary {
    background-color: var(--f-primary);
    color: white;
}

.f-btn-primary:hover {
    background-color: #0061e9;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(8, 111, 255, 0.3);
}

.f-btn-secondary {
    background-color: #f3f4f6;
    color: #4b5563;
}

.f-btn-secondary:hover {
    background-color: #e5e7eb;
}

/* Final Submit Styles */
.f-final-card {
    border: 2px solid var(--f-primary);
    box-shadow: 0 25px 50px -12px rgba(8, 111, 255, 0.25);
}

.f-final-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1.125rem;
}

@media (max-width: 640px) {
    .f-stack-container {
        height: 420px;
    }

    .f-card {
        padding: 1.5rem;
    }

    .f-card-title {
        font-size: 1.25rem;
    }
}