/* White-label Token Creator Styles */
/* Theme colors (--bg-*, --text-*, --accent*, --error, --success) are injected from config */

/* CSS Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Font sizes (not theme-dependent) */
    --font-size-header: 18px;
    --font-size-subheader: 16px;
    --font-size-primary: 15px;
    --font-size-tertiary: 13px;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: var(--font-size-primary);
    color: var(--text-primary);
    background: var(--bg-page);
    line-height: 1.5;
    min-height: 100vh;
}

/* Layout */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.main-content.centered {
    justify-content: center;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 2rem;
}

.header img {
    max-width: 280px;
    height: auto;
}

.header p {
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: var(--font-size-header);
    color: var(--accent);
    margin-bottom: 1rem;
    font-weight: 600;
}

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

.label {
    display: block;
    font-size: var(--font-size-primary);
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.label .required {
    color: var(--accent);
}

.help {
    font-size: var(--font-size-tertiary);
    color: var(--text-tertiary);
    margin-top: 0.35rem;
}

.input, .textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: var(--font-size-primary);
    font-family: inherit;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input:focus, .textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 201, 0, 0.15);
}

.input::placeholder, .textarea::placeholder {
    color: var(--text-secondary);
}

.input.is-invalid {
    border-color: var(--error);
}

.textarea {
    min-height: 80px;
    resize: vertical;
}

/* Row layout */
.row {
    display: flex;
    gap: 1rem;
}

.row .field {
    flex: 1;
}

@media (max-width: 480px) {
    .row {
        flex-direction: column;
        gap: 0;
    }
}

/* File Input */
.file-input-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-input {
    display: none;
}

.file-btn {
    padding: 0.6rem 1rem;
    font-size: var(--font-size-primary);
    color: var(--bg-page);
    background: var(--accent);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

.file-btn:hover {
    background: var(--accent-hover);
}

.file-name {
    color: var(--text-secondary);
    font-size: var(--font-size-tertiary);
}

.image-preview {
    max-width: 100px;
    max-height: 100px;
    margin-top: 0.75rem;
    border-radius: 8px;
    display: none;
}

/* Checkboxes */
.checkbox-field {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: background 0.2s;
}

.checkbox-field:hover {
    background: rgba(255, 255, 255, 0.05);
}

.checkbox-field input[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-secondary);
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.2s;
}

.checkbox-field input[type="checkbox"]:checked {
    background: var(--accent);
    border-color: var(--accent);
}

.checkbox-field input[type="checkbox"]:checked::after {
    content: '\2713';
    display: block;
    text-align: center;
    color: var(--bg-page);
    font-size: 14px;
    font-weight: bold;
    line-height: 16px;
}

.checkbox-content {
    flex: 1;
}

.checkbox-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
}

.price-tag {
    color: var(--accent);
    font-weight: 600;
    font-size: var(--font-size-tertiary);
}

.checkbox-help {
    font-size: var(--font-size-tertiary);
    color: var(--text-tertiary);
    margin-top: 0.25rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-size: var(--font-size-primary);
    font-family: inherit;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 140px;
}

.btn-primary {
    color: var(--bg-page);
    background: var(--accent);
}

.btn-primary:hover:not(:disabled) {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-primary:disabled {
    background: var(--accent-dark);
    cursor: not-allowed;
}

.btn-secondary {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-full {
    width: 100%;
}

/* Spinner */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Divider */
.divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 1.5rem 0;
}

/* Price Summary */
.price-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 201, 0, 0.1);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.price-summary .total {
    font-size: var(--font-size-header);
    font-weight: 600;
}

.price-summary .base {
    font-size: var(--font-size-tertiary);
    color: var(--text-secondary);
}

/* Status Messages */
.status {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: var(--font-size-primary);
    display: none;
}

.status.is-visible {
    display: block;
}

.status-info {
    background: rgba(255, 201, 0, 0.1);
    color: var(--accent);
    border: 1px solid rgba(255, 201, 0, 0.2);
}

.status-error {
    background: rgba(255, 71, 87, 0.1);
    color: var(--error);
    border: 1px solid rgba(255, 71, 87, 0.2);
}

.status-success {
    background: rgba(46, 213, 115, 0.1);
    color: var(--success);
    border: 1px solid rgba(46, 213, 115, 0.2);
}

/* Progress Steps */
.progress-steps {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
}

.progress-step.active {
    color: var(--accent);
}

.progress-step.done {
    color: var(--success);
}

.step-icon {
    width: 20px;
    text-align: center;
}

/* Success Screen */
.success-screen {
    text-align: center;
    padding: 1rem 0;
}

.success-icon {
    width: 64px;
    height: 64px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 32px;
}

.success-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.success-subtitle {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.token-info {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.token-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.token-info-row:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.token-info-label {
    color: var(--text-secondary);
}

.token-info-value {
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mint-address {
    font-family: monospace;
    font-size: var(--font-size-tertiary);
    word-break: break-all;
}

.copy-btn {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 16px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.copy-btn:hover {
    opacity: 1;
}

.success-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Wallet Info Bar (shown in section 2) */
.wallet-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(255, 201, 0, 0.1);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: var(--font-size-tertiary);
}

.wallet-bar-address {
    font-family: monospace;
    color: var(--text-secondary);
}

.wallet-bar-details {
    display: flex;
    gap: 1rem;
    color: var(--text-secondary);
}

.wallet-bar-details strong {
    color: var(--text-primary);
}

@media (max-width: 480px) {
    .wallet-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Section visibility */
.section-hidden {
    display: none !important;
}

/* Footer */
.footer {
    margin-top: 3rem;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: var(--font-size-tertiary);
    color: var(--text-tertiary);
}

/* Steps outline */
.steps-outline {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    margin-bottom: 2.5rem;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: var(--font-size-tertiary);
}

.step-item .step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
}

.step-item.active .step-num {
    background: var(--accent);
    color: var(--bg-page);
}

.step-arrow {
    color: var(--text-tertiary);
    font-size: 12px;
    margin-top: 0.25rem;
}

@media (max-width: 480px) {
    .steps-outline {
        gap: 0.5rem;
    }
    .step-item span:not(.step-num) {
        display: none;
    }
}

/* What's Next section */
.whats-next {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.whats-next-title {
    font-size: var(--font-size-subheader);
    color: var(--accent);
    margin-bottom: 1rem;
    text-align: center;
}

.platform-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.platform-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.2s;
    min-width: 140px;
}

.platform-link:hover {
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.platform-link .platform-name {
    font-weight: 600;
}

.platform-link .platform-desc {
    font-size: var(--font-size-tertiary);
    color: var(--text-secondary);
}

/* Token image in success */
.success-token-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 1rem auto 1rem;
    display: none;
    border: 3px solid var(--accent);
}

.success-token-image.is-visible {
    display: block;
}

/* Hidden elements */
.hidden {
    display: none !important;
}

/* Links */
a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Tag */
.tag {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    font-size: var(--font-size-tertiary);
    background: rgba(255, 201, 0, 0.2);
    color: var(--accent);
    border-radius: 4px;
    margin-left: 0.5rem;
}
