/* ==========================================================================
   POKEIDLE - MODAL DE APARÊNCIA (TEMA MOCHILA CLEAN LIGHT)
   Layout modular em abas: Trajes/Personagens, Asas, Auras e Cores/Addons
   ========================================================================== */

.outfit-modal-box {
    position: relative;
    width: 860px;
    max-width: 96vw;
    height: 640px;
    max-height: 90vh;
    background: #f2f2f2;
    border-radius: 8px;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    font-family: var(--font-main, 'Outfit', 'Inter', sans-serif);
    display: flex;
    flex-direction: column;
    animation: outfitModalFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes outfitModalFadeIn {
    from { opacity: 0; transform: scale(0.97) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Faixa angular e Pokébola decorativa padrão Mochila */
.outfit-modal-box .pkmn-shop-orange-bg {
    position: absolute;
    top: 0;
    left: -40px;
    width: 44%;
    min-width: 340px;
    max-width: 500px;
    height: 100%;
    background: #ffffff;
    clip-path: polygon(0 0, 100% 0, 40% 100%, 0 100%);
    z-index: 0;
    pointer-events: none;
    filter: drop-shadow(4px 0 10px rgba(0, 0, 0, 0.05));
}

.outfit-modal-box .pkmn-shop-pokeball-bg {
    position: absolute;
    right: -30px;
    bottom: -30px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(203, 213, 225, 0.25) 0%, transparent 70%);
    border: 24px solid rgba(0, 0, 0, 0.02);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

/* ==================== HEADER ==================== */
.outfit-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 22px;
    position: relative;
    z-index: 2;
    background: transparent !important;
    border-bottom: 1px solid rgba(203, 213, 225, 0.6);
    flex-shrink: 0;
}

.outfit-header-title {
    font-size: 20px;
    font-weight: 800;
    color: #1a1a1a;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
}

/* ==================== NAVBAR DE ABAS ==================== */
.outfit-tabs-navbar {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 0 24px;
    position: relative;
    z-index: 2;
    background: transparent !important;
    border-bottom: 1px solid rgba(203, 213, 225, 0.6);
    flex-shrink: 0;
    min-height: 44px;
}

.outfit-tab-btn {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    font-family: var(--font-main, 'Outfit', 'Inter', sans-serif);
    transition: color 0.18s ease;
    padding: 10px 4px;
    position: relative;
}

.outfit-tab-btn:hover {
    color: #1a1a1a;
}

.outfit-tab-btn.active {
    color: #1a1a1a;
}

.outfit-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background: #f16c20;
    border-radius: 2px 2px 0 0;
}

/* ==================== CORPO PRINCIPAL ==================== */
.outfit-main-body {
    display: flex;
    gap: 16px;
    padding: 14px 20px;
    position: relative;
    z-index: 2;
    flex: 1;
    min-height: 0;
    box-sizing: border-box;
}

/* ==================== COLUNA ESQUERDA: PREVIEW ==================== */
.outfit-preview-card {
    width: 250px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #ffffff;
    border-radius: 10px;
    padding: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    box-sizing: border-box;
    gap: 10px;
}

.outfit-preview-card-title {
    font-size: 11px;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 800;
    letter-spacing: 0.8px;
    margin: 0;
}

.outfit-canvas-stage {
    position: relative;
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, #f8fafc 0%, #edf2f7 100%);
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.04);
}

#outfit-preview-canvas {
    image-rendering: pixelated;
    width: 140px;
    height: 140px;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.16));
}

/* Controles de Direção */
.outfit-dir-cluster {
    display: flex;
    gap: 6px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.outfit-dir-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #475569;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.outfit-dir-btn:hover {
    background: #e2e8f0;
    color: #1a1a1a;
}

.outfit-dir-btn.active {
    background: #f16c20;
    color: #ffffff;
    box-shadow: 0 2px 5px rgba(241, 108, 32, 0.35);
}

/* Resumo de Cosméticos Equipados */
.outfit-equipped-summary {
    width: 100%;
    margin-top: auto;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 11px;
}

.outfit-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #64748b;
    font-weight: 600;
}

.outfit-summary-row strong {
    color: #1a1a1a;
    font-weight: 800;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==================== COLUNA DIREITA: PAINÉIS DE ABAS ==================== */
.outfit-content-panel {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    box-sizing: border-box;
    overflow: hidden;
}

.outfit-tab-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 12px;
}

.outfit-tab-content.hidden {
    display: none !important;
}

/* Topo do Painel de Outfits: Gênero */
.outfit-gender-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.outfit-section-label {
    font-size: 13px;
    font-weight: 800;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.outfit-gender-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 800;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    user-select: none;
}

.outfit-gender-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f16c20;
    box-shadow: 0 0 6px rgba(241, 108, 32, 0.5);
}

/* ==================== GRIDS DE COSMÉTICOS (CARDS) ==================== */
.outfit-scrollable-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 10px;
    overflow-y: auto;
    padding: 6px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    align-content: start;
}

.outfit-item-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.16s ease;
    position: relative;
    min-height: 86px;
    box-sizing: border-box;
}

.outfit-item-card:hover {
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
}

.outfit-item-card.active {
    border-color: #f16c20 !important;
    background: #fff7ed !important;
    box-shadow: 0 0 0 1px #f16c20, 0 4px 10px rgba(241, 108, 32, 0.18) !important;
}

.outfit-card-canvas-wrap {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.outfit-card-canvas-wrap canvas {
    max-width: 48px;
    max-height: 48px;
    image-rendering: pixelated;
}

.outfit-card-name {
    margin-top: 4px;
    font-size: 11px;
    font-weight: 700;
    color: #1a1a1a;
    text-align: center;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.outfit-card-badge {
    position: absolute;
    top: 3px;
    right: 3px;
    font-size: 8px;
    font-weight: 900;
    text-transform: uppercase;
    padding: 1px 4px;
    border-radius: 3px;
    letter-spacing: 0.3px;
}

.badge-starter {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #cbd5e1;
}

.badge-unlocked {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}

.badge-equipped {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

/* ==================== RODAPÉ DA ABA DE TRAJES: ADDONS ==================== */
.outfit-addons-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.outfit-addons-options {
    display: flex;
    gap: 14px;
}

.outfit-addon-label {
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.outfit-addon-label input {
    cursor: pointer;
    accent-color: #f16c20;
}

/* ==================== ABA DE CORES ==================== */
.outfit-color-parts-navbar {
    display: flex;
    gap: 6px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.outfit-part-tab {
    flex: 1;
    white-space: nowrap;
    border: none;
    background: transparent;
    color: #64748b;
    font-weight: 700;
    padding: 6px 4px;
    font-size: 12px;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease;
}

.outfit-part-tab.active {
    background: #f16c20;
    color: #ffffff;
    font-weight: 800;
    box-shadow: 0 2px 4px rgba(241, 108, 32, 0.3);
}

.outfit-palette-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 4px;
    overflow-y: auto;
    background: #f8fafc;
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    align-content: start;
}

.outfit-color-swatch {
    aspect-ratio: 1;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    cursor: pointer;
    box-sizing: border-box;
    transition: transform 0.12s ease, border-color 0.12s ease;
}

.outfit-color-swatch:hover {
    transform: scale(1.22);
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* ==================== FOOTER BOTÕES ==================== */
.outfit-modal-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    padding: 12px 22px;
    border-top: 1px solid rgba(203, 213, 225, 0.6);
    background: transparent;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.outfit-btn-cancel {
    background: #ffffff;
    color: #64748b;
    font-weight: 700;
    border: 1px solid #cbd5e1;
    padding: 8px 22px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-family: var(--font-main, 'Outfit', 'Inter', sans-serif);
    transition: all 0.15s ease;
}

.outfit-btn-cancel:hover {
    background: #f1f5f9;
    color: #1a1a1a;
}

.outfit-btn-apply {
    background: #f16c20;
    color: #ffffff;
    font-weight: 800;
    border: none;
    padding: 10px 30px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-family: var(--font-main, 'Outfit', 'Inter', sans-serif);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(241, 108, 32, 0.3);
    transition: all 0.18s ease;
}

.outfit-btn-apply:hover {
    background: #d95a14;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(241, 108, 32, 0.4);
}
