/* Component Styles */

/* Mode Cards */
.mode-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mode-card {
    padding: 0.875rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.mode-card:hover {
    border-color: #93C5FD;
    background: #F8FBFF;
}

.mode-card.active {
    border-color: var(--primary);
    background: var(--primary-light);
}

.mode-card.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    border-radius: 3px 0 0 3px;
    background: var(--primary);
}

.mode-name {
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.2rem;
}

.mode-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.mode-card.active .mode-name {
    color: var(--primary);
}

/* Radio Groups */
.radio-list {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

.radio-item:hover {
    background: #F8FAFC;
}

.radio-item input[type="radio"] {
    accent-color: var(--primary);
    cursor: pointer;
}

.radio-item label {
    font-size: 0.8rem;
    color: var(--text);
    cursor: pointer;
    line-height: 1.3;
}

/* Progress Steps */
.prog-step {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex: 1;
    position: relative;
}

.prog-step:not(:last-child)::after {
    content: '';
    flex: 1;
    height: 2px;
    background: var(--border);
    margin: 0 0.5rem;
    border-radius: 2px;
    transition: background 0.4s;
}

.prog-step.completed:not(:last-child)::after {
    background: var(--success);
}

.prog-step.active:not(:last-child)::after {
    background: linear-gradient(to right, var(--primary), var(--border));
}

.prog-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--border);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.prog-step.active .prog-dot {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.prog-step.completed .prog-dot {
    background: var(--success);
    color: white;
}

.prog-info {
    display: flex;
    flex-direction: column;
}

.prog-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.prog-step.active .prog-label {
    color: var(--primary);
}

.prog-step.completed .prog-label {
    color: var(--success);
}

.prog-title {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text);
    line-height: 1.2;
}

/* Step Cards */
.step-card {
    background: var(--surface-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.step-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    background: var(--primary-light);
}

/* Form Components */
.param-form {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.form-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.6rem 0.875rem;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background: #FAFBFC;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Pill Radio Group */
.pill-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pill-option {
    position: relative;
}

.pill-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.pill-label {
    display: block;
    padding: 0.4rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.pill-option input[type="radio"]:checked + .pill-label {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.5rem;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}

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

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1.5px solid var(--border);
}

.btn-ghost:hover {
    background: var(--bg);
    color: var(--text);
}

.btn-success {
    background: linear-gradient(135deg, #059669, #10B981);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.35);
}

.btn-component {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.5rem;
}

.btn-component:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

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

.btn-component:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Result Cards */
.result-card {
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.result-card.success {
    background: var(--success-bg);
    border: 1.5px solid var(--success-border);
}

.result-card.info {
    background: #EFF6FF;
    border: 1.5px solid #BFDBFE;
}

.result-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.result-card.success .result-icon {
    background: var(--success);
    color: white;
}

.result-card.info .result-icon {
    background: var(--primary);
    color: white;
}

.result-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.result-card.success .result-label {
    color: #065F46;
}

.result-card.info .result-label {
    color: var(--primary-dark);
}

.result-value {
    font-size: 0.8rem;
    font-family: monospace;
    color: var(--text);
    word-break: break-all;
}

/* Completion Banner */
.completion-banner {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #F0FDF4, #DCFCE7);
    border-radius: var(--radius);
    border: 2px solid var(--success-border);
}

.check-big {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.75rem;
    color: white;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

.completion-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #065F46;
    margin-bottom: 0.5rem;
}

.completion-desc {
    font-size: 0.875rem;
    color: #047857;
    line-height: 1.6;
}

.final-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.final-info-item {
    background: white;
    border-radius: 10px;
    border: 1px solid var(--success-border);
    padding: 0.875rem 1rem;
    text-align: left;
}

.final-info-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.3rem;
}

.final-info-value {
    font-size: 0.82rem;
    font-family: monospace;
    color: var(--text);
    word-break: break-all;
}

/* Sub Tabs */
.sub-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
    gap: 0;
}

.sub-tab {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}

.sub-tab:hover {
    color: var(--text);
}

.sub-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

/* Data Pill */
.data-pill {
    display: inline-block;
    background: #FEF3C7;
    border: 1px solid #FDE68A;
    color: #92400E;
    font-size: 0.7rem;
    font-family: monospace;
    padding: 1px 6px;
    border-radius: 4px;
}

/* Component Area */
.component-area {
    background: #F8FAFC;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    margin-top: 1rem;
}

.component-form {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    margin-bottom: 1.5rem;
}

.component-input-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.3rem;
}

.component-mount-container {
    min-height: 120px;
    padding: 1.5rem;
    background: white;
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    margin: 1.5rem 0;
    display: none;
    position: relative;
}

.component-mount-container.active {
    display: block;
    border-color: var(--primary);
    background: #FAFBFC;
}

.component-mount-container::before {
    content: '组件加载区域';
    position: absolute;
    top: -0.625rem;
    left: 1rem;
    background: white;
    padding: 0 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
}

.component-mount-container.active::before {
    color: var(--primary);
}

.component-mount {
    min-height: 60px;
    display: none;
}

.component-mount.active {
    display: block;
}

.token-display {
    margin-top: 1.5rem;
    padding: 1.25rem 1.5rem;
    background: var(--success-bg);
    border: 1.5px solid var(--success-border);
    border-radius: var(--radius-sm);
    display: none;
    position: relative;
}

.token-display.active {
    display: block;
}

.token-display::before {
    content: 'Payment Token';
    position: absolute;
    top: -0.625rem;
    left: 1rem;
    background: var(--success-bg);
    padding: 0 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: #065F46;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.token-display-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #065F46;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.token-display-value {
    font-size: 0.85rem;
    font-family: monospace;
    color: var(--text);
    word-break: break-all;
    line-height: 1.6;
    background: white;
    padding: 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--success-border);
}
