/* =========================================================================
   WTAI Admin Dashboard & Setup Wizard Styles
   ========================================================================= */

.wtai-wrap, .wtai-wizard-wrap {
    /* Variables */
    --wtai-bg: #f8fafc;
    --wtai-card-bg: #ffffff;
    --wtai-text: #0f172a;
    --wtai-text-muted: #64748b;
    --wtai-border: #e2e8f0;
    --wtai-primary: #3b82f6;
    --wtai-primary-hover: #2563eb;
    --wtai-gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --wtai-gradient-hover: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    --wtai-danger: #ef4444;
    --wtai-success: #10b981;
    --wtai-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    --wtai-glass: rgba(255, 255, 255, 0.7);

    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--wtai-text);
}

.wtai-wrap {
    max-width: 1100px;
    margin: 20px 20px 0 0;
    background: var(--wtai-bg);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--wtai-shadow);
    border: 1px solid var(--wtai-border);
}

/* =====================================================================
   General Dashboard Styles
   ===================================================================== */

.wtai-header {
    background: var(--wtai-card-bg);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid var(--wtai-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0;
    box-shadow: var(--wtai-shadow);
    color: var(--wtai-text);
}

.wtai-header h1 {
    color: var(--wtai-text);
}

.wtai-tabs {
    display: flex;
    gap: 0;
    background: var(--wtai-card-bg);
    border: 1px solid var(--wtai-border);
    border-top: none;
    border-radius: 0 0 12px 12px;
    margin-bottom: 25px;
    overflow: hidden;
}

.wtai-tab {
    flex: 1;
    padding: 14px 20px;
    border: none;
    background: var(--wtai-bg);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--wtai-text-muted);
    transition: all 0.2s ease;
    border-right: 1px solid var(--wtai-border);
}

.wtai-tab:last-child {
    border-right: none;
}

.wtai-tab:hover {
    background: var(--wtai-card-bg);
    color: var(--wtai-text);
}

.wtai-tab.active {
    background: var(--wtai-card-bg);
    color: var(--wtai-primary);
    border-bottom: 3px solid var(--wtai-primary);
}

.wtai-tab-content { display: none; }
.wtai-tab-content.active { display: block; animation: fadeIn 0.4s ease forwards; }

.wtai-card {
    background: var(--wtai-card-bg);
    border: 1px solid var(--wtai-border);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--wtai-shadow);
}

.wtai-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.wtai-section-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--wtai-border);
    color: var(--wtai-text);
}

/* Inputs */
.wtai-input, .wtai-select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--wtai-border);
    border-radius: 8px;
    margin-top: 5px;
    box-sizing: border-box;
    font-size: 14px;
    background: var(--wtai-bg);
    color: var(--wtai-text);
    transition: border-color 0.2s;
}

.wtai-input:focus, .wtai-select:focus {
    border-color: var(--wtai-primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Lang Grid */
.wtai-lang-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}

.wtai-lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--wtai-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    background: var(--wtai-bg);
}

.wtai-lang-option:hover {
    border-color: var(--wtai-primary);
    transform: translateY(-1px);
}

.wtai-lang-option.selected {
    border-color: var(--wtai-primary);
    background: rgba(59, 130, 246, 0.05);
}

.wtai-lang-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.wtai-lang-option input { display: none; }

/* Buttons */
.wtai-btn-gradient {
    background: var(--wtai-gradient);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.wtai-btn-gradient:hover {
    background: var(--wtai-gradient-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    color: #fff;
}

.wtai-btn-primary {
    background: var(--wtai-primary);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    transition: all 0.2s ease;
}

.wtai-btn-primary:hover {
    background: var(--wtai-primary-hover);
    color: #fff;
}

.wtai-btn-outline {
    background: transparent;
    color: var(--wtai-primary);
    border: 1px solid var(--wtai-primary);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wtai-btn-outline:hover {
    background: rgba(59, 130, 246, 0.1);
}

button:disabled, .wtai-btn-primary:disabled, .wtai-btn-gradient:disabled, .wtai-btn-outline:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
    transform: none;
}

/* Progress */
.wtai-progress-bg {
    background: var(--wtai-bg);
    border-radius: 10px;
    height: 12px;
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--wtai-border);
}

.wtai-progress-bar {
    height: 100%;
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--wtai-gradient);
}

/* Stats Table */
.wtai-stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.wtai-stats-table th {
    text-align: left;
    padding: 12px;
    border-bottom: 2px solid var(--wtai-border);
    color: var(--wtai-text-muted);
    font-weight: 600;
}
.wtai-stats-table td {
    padding: 12px;
    border-bottom: 1px solid var(--wtai-border);
    color: var(--wtai-text);
}


/* =====================================================================
   Setup Wizard Styles
   ===================================================================== */
.wtai-wizard-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 32px); /* Offset WP admin bar */
    margin: -10px -20px -20px -20px; /* Offset WP content padding */
    background: var(--wtai-bg);
    padding: 20px;
    font-family: 'Inter', sans-serif;
    color: var(--wtai-text);
}

.wtai-wizard-container {
    background: var(--wtai-card-bg);
    width: 100%;
    max-width: 600px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    padding: 40px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--wtai-border);
}

.wtai-wizard-step {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.wtai-wizard-step.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: slideUp 0.5s ease forwards;
}

.wtai-wizard-logo {
    text-align: center;
    margin-bottom: 30px;
}

.wtai-wizard-logo img {
    max-width: 180px;
    height: auto;
}

.wtai-wizard-step h2 {
    font-size: 26px;
    line-height: 1.4;
    font-weight: 700;
    margin-bottom: 15px;
    text-align: center;
    color: var(--wtai-text);
}

.wtai-wizard-desc {
    font-size: 16px;
    color: var(--wtai-text-muted);
    text-align: center;
    margin-bottom: 30px;
    line-height: 1.6;
}

.wtai-wizard-input {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--wtai-border);
    border-radius: 10px;
    font-size: 16px;
    margin-bottom: 20px;
    background: var(--wtai-bg);
    color: var(--wtai-text);
    transition: border-color 0.3s;
}

.wtai-wizard-input:focus {
    border-color: var(--wtai-primary);
    outline: none;
}

.wtai-wizard-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

/* Lang Grid inside Wizard */
.wtai-wizard-lang-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
}

.wtai-wizard-lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    border: 2px solid var(--wtai-border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--wtai-bg);
}

.wtai-wizard-lang-option:hover {
    border-color: var(--wtai-primary);
}

.wtai-wizard-lang-option.selected {
    border-color: var(--wtai-primary);
    background: rgba(59, 130, 246, 0.08);
}

.wtai-wizard-lang-option.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.wtai-wizard-lang-option input { display: none; }

.wtai-wizard-error {
    color: var(--wtai-danger);
    background: rgba(239, 68, 68, 0.1);
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    text-align: center;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.wtai-wizard-token-box {
    background: var(--wtai-bg);
    border: 1px solid var(--wtai-border);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
}

.wtai-wizard-token-title {
    font-size: 14px;
    color: var(--wtai-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.wtai-wizard-token-value {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.2;
    padding-bottom: 5px;
    color: var(--wtai-text);
    background: var(--wtai-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 5px;
}

.wtai-wizard-token-plan {
    font-size: 16px;
    font-weight: 600;
    color: var(--wtai-primary);
}

.wtai-wizard-success-icon {
    font-size: 64px;
    text-align: center;
    margin-bottom: 20px;
    animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.wtai-wizard-selected-langs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

.wtai-wizard-selected-langs .wtai-badge {
    background: var(--wtai-bg);
    border: 1px solid var(--wtai-border);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

/* Animations */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes popIn {
    0% { opacity: 0; transform: scale(0.5); }
    100% { opacity: 1; transform: scale(1); }
}