/* =====================================================
   merchant-register.css — 3-step registration wizard
   ===================================================== */

/* ---- Step Indicator ---- */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1.5rem 0 2rem;
    gap: 0;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.step-circle {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: #e5e7eb;
    color: #9ca3af;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, color 0.3s, box-shadow 0.3s;
}

.step-item.active .step-circle {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.2);
}

.step-item.completed .step-circle {
    background: #10b981;
    color: #fff;
}

.step-label {
    font-size: 0.72rem;
    font-weight: 500;
    color: #9ca3af;
    white-space: nowrap;
    transition: color 0.3s;
}

.step-item.active .step-label,
.step-item.completed .step-label {
    color: var(--text-dark);
}

.step-line {
    flex: 1;
    height: 2px;
    background: #e5e7eb;
    margin: 0 0.5rem;
    margin-bottom: 1.2rem;
    transition: background 0.3s;
    min-width: 3rem;
}

.step-line.completed {
    background: #10b981;
}

/* ---- Panel ---- */
.step-panel {
    display: none;
    animation: panelIn 0.3s ease-out;
}

.step-panel.active {
    display: block;
}

@keyframes panelIn {
    from { opacity: 0; transform: translateX(12px); }
    to   { opacity: 1; transform: translateX(0); }
}

.panel-header {
    margin-bottom: 1.5rem;
}

.panel-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.3rem;
}

.panel-header p {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* ---- Merchant Type Grid ---- */
.merchant-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.type-card {
    border: 2px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.25rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    user-select: none;
}

.type-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.type-card.selected {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.06);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.type-card-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.type-card-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-dark);
}

.type-loading {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-light);
    padding: 1rem 0;
}

.spinner-inline {
    width: 1.1rem;
    height: 1.1rem;
    border: 2px solid #c7d2fe;
    border-bottom-color: var(--primary);
    border-radius: 50%;
    animation: rotation 0.8s linear infinite;
    flex-shrink: 0;
}

/* ---- Form Grid ---- */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

textarea {
    resize: vertical;
    min-height: 80px;
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s;
    background-color: transparent;
}

textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.required {
    color: #ef4444;
}

/* ---- Upload Area ---- */
.upload-area {
    border: 2px dashed var(--border);
    border-radius: 0.75rem;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s, background 0.2s;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-area:hover {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.03);
}

.upload-area.banner-upload {
    min-height: 100px;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-light);
    font-size: 0.82rem;
    padding: 1rem;
    text-align: center;
}

.upload-icon {
    font-size: 1.75rem;
}

.upload-area img.preview-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 0.6rem;
}

.upload-area.banner-upload img.preview-img {
    height: 100px;
}

.upload-status {
    font-size: 0.78rem;
    margin-top: 0.35rem;
    min-height: 1rem;
}

.upload-status.uploading { color: var(--primary); }
.upload-status.done      { color: #10b981; }
.upload-status.error     { color: #ef4444; }

/* ---- Country Detail Card ---- */
.country-detail-card {
    background: #f9fafb;
    border: 1px solid var(--border);
    border-radius: 0.6rem;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.country-flag {
    font-size: 1.75rem;
    line-height: 1;
}

.country-meta {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.country-meta strong { color: var(--text-dark); }
.country-meta span   { color: var(--text-light); font-size: 0.8rem; }

/* ---- Step Actions ---- */
.step-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    gap: 1rem;
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text-dark);
    width: auto;
    padding: 0.75rem 1.5rem;
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-primary {
    width: auto;
    padding: 0.875rem 1.75rem;
}

/* ---- Success Panel ---- */
.success-panel {
    text-align: center;
    padding: 2rem 1rem;
}

.success-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.success-panel h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.success-panel p {
    color: var(--text-light);
    max-width: 360px;
    margin: 0 auto;
}

/* ---- Responsive ---- */
@media (max-width: 580px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-group.full-width {
        grid-column: 1;
    }

    .step-label {
        display: none;
    }

    .step-line {
        min-width: 2rem;
    }
}
