/* --- 1. LAYOUT GENERAL (Shortcode y Plantilla) --- */

/* Contenedor maestro: Controla el ancho en TODOS los casos */
.cwd-wrapper {
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
    position: relative;
}

/* Solo para la Plantilla Limpia (Centrado vertical y fondo) */
.cwd-clean-page-wrapper {
    background-color: #f7f7f7;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    box-sizing: border-box;
}

.cwd-clean-container {
    width: 100%;
    /* El ancho lo controla .cwd-wrapper dentro */
}

.cwd-form-title {
    text-align: center;
    color: #004b7c;
    margin-bottom: 25px;
    font-size: 28px;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-weight: bold;
}

/* --- 2. ESTILOS DEL FORMULARIO --- */
.cwd-donation-form {
    background: #fff;
    padding: 30px;
    width: 100%;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border-radius: 6px;
    box-sizing: border-box;
}

.cwd-donation-form * {
    box-sizing: border-box;
}

/* Toggle Tipo (Puntual / Periódica) */
.cwd-type-toggle {
    display: flex;
    margin-bottom: 25px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.cwd-type-toggle button {
    flex: 1;
    padding: 15px;
    border: none;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    background-color: #f9f9f9;
    color: #555;
    border-right: 1px solid #e0e0e0;
}

.cwd-type-toggle button:last-child {
    border-right: none;
}

.cwd-type-toggle button.active {
    background-color: #004b7c;
    color: #fff;
}

/* Periodos (Mes, Trimestre...) */
.cwd-periods {
    display: flex;
    justify-content: space-around;
    margin-bottom: 25px;
    background: #f0f4f8;
    padding: 15px;
    border-radius: 4px;
    align-items: center;
    flex-wrap: wrap; /* Evita roturas en móviles */
    gap: 10px;
}

.cwd-radio-label {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: #333;
    font-weight: 500;
}

.cwd-radio-label input[type="radio"] {
    accent-color: #004b7c;
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

/* Display Grande (Input precio) */
.cwd-big-display {
    display: flex;
    border: 1px solid #ccc;
    margin-bottom: 20px;
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
    transition: border-color 0.3s;
}

.cwd-big-display:focus-within {
    border-color: #004b7c;
}

.cwd-big-display input {
    border: none;
    width: 100%;
    text-align: center;
    font-size: 36px;
    padding: 15px;
    color: #333;
    outline: none;
    background: transparent;
    font-weight: bold;
    margin: 0;
}

.cwd-big-display .currency {
    background: #f2f2f2;
    padding: 0 25px;
    color: #555;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border-left: 1px solid #ccc;
}

/* Botones de Cantidad */
.cwd-amounts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.cwd-amounts button {
    background-color: #f2f2f2;
    border: 1px solid transparent;
    padding: 15px;
    font-size: 16px;
    color: #333;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    font-weight: 500;
}

.cwd-amounts button:hover {
    background-color: #e6e6e6;
}

.cwd-amounts button.active {
    background-color: #004b7c;
    color: #fff;
    border-color: #004b7c;
}

/* Botón Custom y Submit */
.cwd-custom-btn {
    width: 100%;
    padding: 10px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 14px;
    text-decoration: underline;
    margin-bottom: 25px;
}

.cwd-submit {
    width: 100%;
    background-color: #ffec00;
    color: #000;
    font-weight: 800;
    text-transform: uppercase;
    padding: 20px;
    border: none;
    cursor: pointer;
    font-size: 18px;
    letter-spacing: 1px;
    border-radius: 4px;
    transition: background 0.3s;
}

.cwd-submit:hover {
    background-color: #ebd900;
}

/* Utilidad inputs */
input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { 
    -webkit-appearance: none; 
    margin: 0; 
}
input[type=number] {
    -moz-appearance: textfield;
}