/* Stepper */
.stepper-container {
    margin-bottom: 2.5rem;
}

.stepper {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.stepper::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 2px;
    background: var(--gray-200);
    z-index: 0;
}

.step-indicator {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--gray-500);
    position: relative;
    z-index: 1;
    margin: 0 2rem;
    transition: var(--transition);
}

.step-indicator.active {
    background: var(--navy);
    border-color: var(--navy);
    color: var(--white);
    box-shadow: 0 0 0 4px rgba(21, 33, 93, 0.1);
}

.step-indicator.completed {
    background: var(--lightblue);
    border-color: var(--lightblue);
    color: var(--navy);
}

/* Step Content Area */
.step-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.step-content.active {
    display: block;
    animation: fadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
}

/* Cards / Options */
.option-grid {
    display: grid;
    gap: 1rem;
}

.grid-2 {
    grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 640px) {
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.grid-4 {
    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 640px) {
    .grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

.selectable-card {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    background: var(--white);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.selectable-card:hover {
    border-color: var(--lightblue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.selectable-card.selected {
    border-color: var(--navy);
    background: rgba(21, 33, 93, 0.02);
}

.selectable-card.selected::before {
    content: '✓';
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--navy);
    color: var(--white);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card-title {
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.card-desc {
    font-size: 0.875rem;
    color: var(--gray-500);
    line-height: 1.4;
}

/* Design Placeholders */
.design-preview {
    aspect-ratio: 3/4;
    border-radius: 8px;
    margin-bottom: 1rem;
    background: var(--gray-200);
    background-size: cover;
    background-position: center;
    transition: transform 0.3s ease;
}

.selectable-card:hover .design-preview {
    transform: scale(1.03);
}

.design-card {
    padding: 1rem;
    text-align: center;
}

.design-card .card-title {
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-input {
    width: 100%;
    max-width: 100%;
    padding: 0.65rem 1rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
    background: var(--gray-100);
    color: var(--navy);
}

textarea.form-input {
    resize: vertical;
}

.form-input:focus {
    outline: none;
    border-color: var(--lightblue);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(66, 196, 231, 0.15);
}

.text-card {
    padding: 1.25rem;
}

.error-msg {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
    font-weight: 500;
}

/* Dynamic Form Panels */
.form-panel { display: none; animation: fadeIn 0.4s ease; }
.form-panel.active { display: block; }

/* Buttons */
.btn {
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--gray-200);
    color: var(--gray-800);
}

.btn-outline:hover {
    border-color: var(--navy);
    color: var(--navy);
    background: var(--gray-100);
}

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

.btn-primary:hover {
    background: #0f1847;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary:disabled {
    background: var(--gray-200);
    color: var(--gray-500);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-accent {
    background: var(--yellow);
    color: var(--navy);
}

.btn-accent:hover {
    background: #e6df42;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.delete-btn {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ef4444;
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, opacity 0.2s;
    line-height: 1;
    opacity: 0;
    pointer-events: none;
}

.custom-bg-card:hover .delete-btn {
    opacity: 1;
    pointer-events: auto;
}

.delete-btn:hover {
    transform: scale(1.1);
    background: #dc2626;
}

/* Typography Options */
.font-inter {
    font-family: 'Inter', sans-serif;
}

.font-dmsans {
    font-family: 'DM Sans', sans-serif;
}

.font-dmserif {
    font-family: 'DM Serif Display', serif;
}

.font-outfit {
    font-family: 'Outfit', sans-serif;
}

.font-manhaj {
    font-family: 'Manhaj', sans-serif;
}

.font-arabic-ramadan {
    font-family: 'ArabicRamadan', sans-serif;
}

.font-brickell {
    font-family: 'Brickell', serif;
}

.font-clausten {
    font-family: 'Clausten', sans-serif;
}

.font-sample {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--navy);
}

/* Actions */
.actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2.5rem;
    border-top: 1px solid var(--gray-200);
    padding-top: 2rem;
}

/* Mobile specific adjustments */
@media (max-width: 639px) {
    .app-container {
        padding: 0.5rem;
    }

    .step-content {
        padding: 1rem;
        box-shadow: none;
        border: 1px solid var(--gray-200);
    }

    .stepper::before {
        width: 70%;
    }

    .step-indicator {
        margin: 0 1rem;
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .actions {
        position: sticky;
        bottom: -1rem; /* Offset the padding of step-content */
        margin-left: -1rem;
        margin-right: -1rem;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        padding: 1rem;
        margin-top: 1.5rem;
        border-top: 1px solid var(--gray-200);
        z-index: 100;
        box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.05);
        display: flex;
        justify-content: space-between;
        gap: 1rem;
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    }
    
    .actions .btn {
        flex: 1;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

/* Styling untuk Overlay Welcome */
.welcome-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.welcome-content {
    max-width: 400px;
}

.welcome-logo {
    width: 80px;
    margin-bottom: 1.5rem;
}

.welcome-content h1 {
    color: var(--navy);
    margin-bottom: 0.5rem;
}

.welcome-content p {
    color: var(--gray-500);
    margin-bottom: 2rem;
}
