/* ===============================
   CONTENEDOR GENERAL
   =============================== */
.sc-container {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: stretch;
    background: transparent;
    padding: 20px;
    color: #1d1d1f;
    border-radius: 12px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
}

/* ===============================
   COLUMNAS
   =============================== */
.sc-left {
    flex: 0 0 58%;
    display: flex;
    flex-direction: column;
}

.sc-left .sc-box {
    flex: 1; 
    display: flex;
    flex-direction: column;
}

.sc-right {
    flex: 0 0 40%;
    display: flex;
    flex-direction: column;
    /*gap: 20px;*/
}

/* ===============================
   CAJAS / FIELDSETS
   =============================== */
.sc-box {
    border: 1px solid #d2d2d7;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 0;
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
}

.sc-box h3 {
    position: absolute;
    top: 0;
    left: 15px;
    transform: translateY(-50%);
    background-color: inherit;
    padding: 0 8px;
    margin: 0;
    font-size: 13px;
    #font-weight: 500;
    color: #86868b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===============================
   GRUPOS
   =============================== */
.sc-group {
    margin-bottom: 50px;
}

.sc-group:last-child {
    margin-bottom: 0;
}

.sc-group > label:first-child {
    display: block;
    font-size: 13px;
    #font-weight: 500;
    color: #1d1d1f;
    margin-bottom: 10px;
}

.sc-group-row {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    margin-bottom: 20px;
}

.sc-group-row > div {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sc-group-row label {
    font-size: 13px;
    font-weight: 500;
    color: #1d1d1f;
    white-space: nowrap;
}

/* ===============================
   BOTONES DE OPCIÓN (Vocación y Skill)
   =============================== */
.sc-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sc-options .sc-opt {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 500;
    font-size: 13px;
    padding: 8px 14px;
    background: rgba(49,67,226,0.2);
    color: #1d1d1f;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    line-height: 1;
}

.sc-options .sc-opt:hover {
    background: rgba(49,67,226,0.4);
    transform: translateY(-1px);
}

.sc-options .sc-opt:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.3);
}

.sc-options .sc-opt.active {
    background: #3143e2;
    color: #ffffff;
    border-color: #3143e2;
    box-shadow: 0 2px 8px rgba(94, 92, 230, 0.3);
}

/* ===============================
   ICONOS EN BOTONES
   =============================== */
.sc-options .sc-opt img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    pointer-events: none;
    display: block;
    flex-shrink: 0;
    margin-bottom: 0;
}

/* ===============================
   INPUTS NUMÉRICOS
   =============================== */
.sc-group-row input[type="number"] {
    width: 90px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #d2d2d7;
    background: #ffffff;
    color: #1d1d1f;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    transition: all 0.2s ease;
}

.sc-group-row input[type="number"]:focus {
    outline: none;
    border-color: #3143e2;
    box-shadow: 0 0 0 3px rgba(94, 92, 230, 0.1);
}

/* Eliminar el ::after global */
.sc-group-row::after {
    content: none;
}

/* Añadir flecha solo entre los divs de inputs */
.sc-group-row > div:first-child::after {
    content: '›';
    font-size: 24px;
    color: #86868b;
    font-weight: 300;
    position: absolute;
    right: -10px;
    bottom: 8px;
}

/* Hacer el primer div relativo para posicionar la flecha */
.sc-group-row > div:first-child {
    position: relative;
}

/* ===============================
   SLIDER DE PORCENTAJE
   =============================== */
.sc-group label[for="sc-percent"] {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.sc-group label[for="sc-percent"] span {
    #font-weight: 500;
    color: #3143e2;
}

/* Controles de porcentaje (input + slider) */
.sc-percent-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sc-percent-controls input[type="number"] {
    width: 70px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #d2d2d7;
    background: #ffffff;
    color: #1d1d1f;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.sc-percent-controls input[type="number"]:focus {
    outline: none;
    border-color: #3143e2;
    box-shadow: 0 0 0 3px rgba(94, 92, 230, 0.1);
}

.sc-percent-controls input[type="range"] {
    flex: 1;
    margin: 0;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, #3143e2 0%, #3143e2 0%, #d2d2d7 0%, #d2d2d7 100%);
    outline: none;
    -webkit-appearance: none;
    margin: 10px 0;
    transition: background 0.1s ease;
}

input[type="range"]:hover {
    filter: brightness(0.95);
}

/* Para navegadores Webkit (Chrome, Safari, Edge) */
input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: transparent;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3143e2;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(94, 92, 230, 0.4);
    transition: all 0.3s ease;
    margin-top: -7px; /* Centrar verticalmente: (20px - 6px) / 2 = 7px */
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(94, 92, 230, 0.6);
}

input[type="range"]::-webkit-slider-thumb:active {
    transform: scale(1.1);
}

/* Para Firefox */
input[type="range"]::-moz-range-track {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #d2d2d7;
}

input[type="range"]::-moz-range-progress {
    height: 6px;
    border-radius: 3px;
    background: #3143e2;
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3143e2;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(94, 92, 230, 0.4);
    transition: all 0.3s ease;
}

input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(94, 92, 230, 0.6);
}

input[type="range"]::-moz-range-thumb:active {
    transform: scale(1.1);
}

/* Transición suave al cambiar valor del slider por clic */
input[type="range"].sc-slider-transition {
    transition: all 0.3s ease;
}

input[type="range"].sc-slider-transition::-webkit-slider-thumb {
    transition: all 0.3s ease;
}

input[type="range"].sc-slider-transition::-moz-range-thumb {
    transition: all 0.3s ease;
}

/* ===============================
   LOYALTY SLIDER
   =============================== */
.sc-group label[for="sc-loyalty"] {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.sc-group label[for="sc-loyalty"]::after {
    content: attr(data-value);
    #font-weight: 500;
    color: #3143e2;
}

#sc-loyalty {
    width: 100%;
}

.sc-range-labels {
    position: relative;
    font-size: 13px;
    color: #3143e2;
    font-weight: 500;
    margin-top: 8px;
    padding: 0 10px;
    height: 20px;
}

.sc-range-labels span {
    position: absolute;
    cursor: pointer;
    transition: all 0.2s ease;
    transform: translateX(-50%);
    white-space: nowrap;
}

.sc-range-labels span:nth-child(1) { left: 0; transform: translateX(0); }
.sc-range-labels span:nth-child(2) { left: calc(10% + 10px); }
.sc-range-labels span:nth-child(3) { left: calc(20% + 9px); }
.sc-range-labels span:nth-child(4) { left: calc(30% + 7px); }
.sc-range-labels span:nth-child(5) { left: calc(40% + 6px); }
.sc-range-labels span:nth-child(6) { left: calc(50% + 4px); }
.sc-range-labels span:nth-child(7) { left: calc(60% + 2px); }
.sc-range-labels span:nth-child(8) { left: calc(70% + 0px); }
.sc-range-labels span:nth-child(9) { left: calc(80% - 2px); }
.sc-range-labels span:nth-child(10) { left: calc(90% - 4px); }
.sc-range-labels span:nth-child(11) { left: 100%; transform: translateX(-100%); }

.sc-range-labels span:hover {
    color: #1d1d1f;
    #font-weight: 500;
    transform: translateX(-50%) scale(1.1);
}

.sc-range-labels span:nth-child(1):hover {
    transform: translateX(0) scale(1.1);
}

.sc-range-labels span:nth-child(11):hover {
    transform: translateX(-100%) scale(1.1);
}

/* ===============================
   CHECKBOX
   =============================== */
.sc-check {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
    user-select: none;
}

.sc-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #3143e2;
}

.sc-check label {
    font-size: 13px;
    color: #1d1d1f;
    cursor: pointer;
}

/* ===============================
   SELECT
   =============================== */
.sc-group label[for="sc-wand"] {
    display: block;
    font-size: 13px;
    #font-weight: 500;
    color: #1d1d1f;
    margin-bottom: 8px;
    text-align: left;
}

select {
    width: 80%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #d2d2d7;
    background: #ffffff;
    color: #1d1d1f;
    font-size: 13px !important;
    cursor: pointer;
    transition: all 0.2s ease;
}

select:focus {
    outline: none;
    border-color: #3143e2;
    box-shadow: 0 0 0 3px rgba(94, 92, 230, 0.1);
}

select option:hover {
    background: #3143e2 !important;
    color: #ffffff !important;
}

select option:checked {
    background: #3143e2;
    color: #ffffff;
}

/* Para navegadores webkit (Chrome, Safari) */
select option {
    padding: 8px 12px;
    transition: all 0.2s ease;
}

select option:hover,
select option:focus {
    background: linear-gradient(#3143e2, #3143e2);
    background-color: #3143e2 !important;
    color: #ffffff !important;
}

/* ===============================
   RESULTADOS
   =============================== */
#sc-results {
    margin-top: 20px;
    flex: 1;
}

#sc-results h3 {
    color: #86868b;
}

#sc-results p {
    margin: 15px 0;
    font-size: 13px !important;
    font-weight: 500;
    color: #1d1d1f;
}

#sc-results p:first-of-type {
    margin-top: 20px;
}

#sc-results span {
    font-weight: 500;
    color: #1d1d1f;
    font-size: 13px;
}

/* Coste de dinero con iconos */
#sc-results p:has(#sc-cost) {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

#sc-cost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f5f5f7;
    border-radius: 8px;
}

/* Varitas con badges */
#sc-wands {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.sc-wand-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f5f5f7;
    border-radius: 8px;
    font-size: 13px;
    position: relative;
}

.sc-wand-badge .sc-multiplier {
    background: #ffd60a;
    color: #1d1d1f;
    font-size: 13px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    position: absolute;
    top: -6px;
    right: -6px;
}

/* Contenedor de varitas */
.sc-wands-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    flex-wrap: wrap;
}

/* Item de varitas */
.sc-wands-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(49, 67, 226, 0.2);
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
}

/* Imagen de varitas */
.sc-wands-img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
    margin-bottom: 0 !important;
}

/* Tiempo necesario */
#sc-time {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.sc-time-value {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: #f5f5f7;
    border-radius: 8px;
    font-size: 13px;
    #font-weight: 500;
}

.sc-time-label {
    font-size: 13px;
    color: #3143e2;
    font-weight: 500;
}

/* Contenedor de tiempo */
.sc-time-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    flex-wrap: wrap;
}

/* Item de tiempo */
.sc-time-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(49, 67, 226, 0.2);
    border-radius: 8px;
    font-weight: 500;
    font-size: 13px;
}

.sc-time-item .sc-time-label {
    font-weight: 400;
    opacity: 0.8;
}

/* Contenedor de costes */
.sc-cost-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    flex-wrap: wrap;
}

/* Items de coste (TC y Gold) */
.sc-cost-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(49, 67, 226, 0.2);
    border-radius: 8px;
    #font-weight: 500;
    font-size: 13px;
}

/* Imagen de moneda */
.sc-cost-img {
    width: 10px;
    height: 10px;
    object-fit: contain;
    margin-bottom: 0 !important;
}

/* Separador "o" sin background */
.sc-cost-separator {
    font-size: 13px;
    color: #86868b;
    font-weight: 500;
    padding: 0 4px;
}

/* ===============================
   INLINE GROUP (Inputs + Porcentaje)
   =============================== */
.sc-inline-group {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 20px;
}

.sc-inline-group .sc-group-row {
    margin-bottom: 0;
    flex-shrink: 0;
    display: flex;
    align-items: flex-end;
    gap: 15px;
}

.sc-inline-group .sc-group {
    flex: 1;
    margin-bottom: 0;
    min-width: 200px;
}

.sc-inline-group .sc-group label[for="sc-percent"] {
    margin-bottom: 5px;
}

/* ===============================
   UTILIDADES
   =============================== */
.sc-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #86868b;
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 500;
    cursor: help;
    margin-left: 4px;
}

.sc-info-icon:hover {
    background: #3143e2;
}

/* Forzar estilos en labels */
label {
    background: none !important;
    background-color: transparent !important;
    transition: none !important;
    cursor: default !important;
}

label:hover {
    background: none !important;
    background-color: transparent !important;
    color: inherit !important;
    transform: none !important;
    box-shadow: none !important;
    border: none !important;
    opacity: 1 !important;
}

.sc-group > label,
.sc-group-row label,
.sc-check label,
.sc-group label[for="sc-wand"],
.sc-group label[for="sc-percent"],
.sc-group label[for="sc-loyalty"] {
    background: none !important;
    background-color: transparent !important;
    transition: none !important;
}

.sc-check,
.sc-check label {
    cursor: pointer !important;
}

/* Forzar flex en inline-group - pero permitir override en responsive */
.sc-container .sc-inline-group {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
}

/* Grupo de checkboxes */
.sc-checks-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sc-checks-group .sc-check {
    margin-bottom: 0;
}

/* Ajustar ancho 50/50 solo en Extra */
.sc-right .sc-box .sc-inline-group .sc-checks-group {
    flex: 0 0 48%;
}

.sc-right .sc-box .sc-inline-group .sc-group {
    flex: 0 0 48%;
}

/* ===============================
   RESPONSIVE
   =============================== */
@media (max-width: 900px) {
    .sc-container {
        flex-direction: column;
    }

    .sc-left,
    .sc-right {
        flex: 1 1 100%;
    }

    .sc-box {
        padding: 15px;
    }

    .sc-options .sc-opt {
        padding: 8px 12px;
        font-size: 13px;
    }

    .sc-range-labels {
        font-size: 10px;
    }
    
    /* Solo afectar al inline-group de skills */
    .sc-container .sc-skills-inline {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 20px;
    }
    
    .sc-skills-inline .sc-group-row {
        margin-bottom: 0;
    }
    
    .sc-skills-inline .sc-group {
        min-width: 100%;
        width: 100%;
    }
    
    /* Mantener el inline-group de Extra en fila si cabe, sino columna */
    .sc-right .sc-box .sc-inline-group {
        flex-wrap: wrap;
    }
}