/* style.css */
:root {
    --primary-color: #2c3e50;
    --accent-color: #3498db;
    --background-color: #fdfdfd;
    --border-radius: 8px;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --shadow: rgba(0, 0, 0, 0.1);
}

body {
    margin: 0;
    background-color: var(--background-color);
    font-family: var(--font-family);
    color: var(--primary-color);
    display: flex;
    justify-content: center;
    padding: 2rem;
    min-height: 100vh;
    box-sizing: border-box;
}

.container {
    max-width: 420px;
    width: 100%;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 8px 20px var(--shadow);
    padding: 2rem;
}

h1 {
    margin-bottom: 1.5rem;
    font-weight: 600;
    text-align: center;
    color: var(--accent-color);
}

label {
    /* Estilo original: display: block forzado */
    display: block;
    margin: 0.6rem 0 0.3rem;
    font-weight: 500;
    cursor: pointer;
}

input[type='number'], input[type='checkbox'], input[type='radio'] {
    margin-right: 0.5rem;
}

input[type='number'] {
    width: 100%;
    padding: 0.6rem 0.8rem;
    font-size: 1rem;
    border-radius: var(--border-radius);
    border: 1px solid #ccc;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

/* ----------------------------------------------------------------- */
/* REGLAS: OCULTAR FLECHAS EN INPUT TYPE="NUMBER" */
/* ----------------------------------------------------------------- */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] {
    -moz-appearance: textfield; /* Para Firefox */
}
/* ----------------------------------------------------------------- */

input[type='number']:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 5px var(--accent-color);
}

fieldset {
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    padding: 1rem;
    margin: 1rem 0;
}

legend {
    font-weight: 600;
    padding: 0 0.5rem;
    color: var(--accent-color);
}

button {
    width: 100%;
    background-color: var(--accent-color);
    border: none;
    padding: 0.8rem;
    font-size: 1.1rem;
    border-radius: var(--border-radius);
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 1rem;
}

button:hover,
button:focus {
    background-color: #2980b9;
    outline: none;
}

.resultado {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: var(--border-radius);
    background-color: #eaf3fb;
    border: 1px solid #bdd7f0;
    font-weight: 600;
    color: var(--primary-color);
    white-space: pre-line;
    min-height: 3.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* ----------------------------------------------------------------- */
/* ESTILO BOTÓN COPIAR */
/* ----------------------------------------------------------------- */
.btn-copiar {
    width: auto;
    background-color: #8e44ad; /* Color diferente para distinguirlo */
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    align-self: flex-end; /* Lo alinea a la derecha dentro del contenedor flex */
    margin-top: 10px; /* Espacio superior */
}
.btn-copiar:hover {
    background-color: #9b59b6;
}

/* ----------------------------------------------------------------- */
/* AJUSTES DE DISPOSICIÓN */
/* ----------------------------------------------------------------- */

/* Estilo para el método de cálculo (Factura/Pago) para que sea horizontal */
.inline-radio-group label {
    display: inline-block; 
    margin-right: 20px;
    margin-top: 0;
    margin-bottom: 0;
}

/* Estilo para el grupo de radio buttons de selección única (Vertical) */
.radio-group-vertical label {
    display: block; 
    margin-bottom: 5px;
    margin-top: 0;
}

/* Estilo para hacer los inputs personalizados más cortos en formato vertical */
.short-input.full-width-input {
    max-width: 100%; /* Permite que ocupe todo el ancho del contenedor */
    width: 80px; /* Establece un ancho fijo más pequeño si se desea, pero respeta el max-width */
    padding: 0.4rem;
    margin-top: -5px; /* Sube ligeramente el input bajo el label */
    margin-bottom: 10px;
}