/* ==========================================================================
   P10 Publicidad — Estilos del formulario público
   ========================================================================== */

/* --------------------------------------------------------------------------
   Contenedor principal
   -------------------------------------------------------------------------- */
.p10-form-wrap {
    max-width: 760px;
    margin: 0 auto 40px;
    font-family: inherit;
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: inherit;
}

/* --------------------------------------------------------------------------
   Encabezado del formulario
   -------------------------------------------------------------------------- */
.p10-form-header {
    text-align: center;
    margin-bottom: 32px;
}
.p10-form-header h2 {
    font-size: 28px;
    margin: 0 0 8px;
    color: #1a1a2e;
}
.p10-form-header p {
    font-size: 16px;
    color: #555;
    margin: 0;
}

/* --------------------------------------------------------------------------
   Alerta de error general
   -------------------------------------------------------------------------- */
.p10-form-alert {
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}
.p10-alert-error {
    background: #fff0f0;
    border-left: 4px solid #dc3232;
    color: #7a1e1e;
}

/* --------------------------------------------------------------------------
   Secciones del formulario
   -------------------------------------------------------------------------- */
.p10-form-section {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 24px 28px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}

.p10-section-title {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.p10-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #c0392b;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Filas y grupos de campos
   -------------------------------------------------------------------------- */
.p10-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
.p10-form-row-full {
    grid-template-columns: 1fr;
}
.p10-form-row:last-child {
    margin-bottom: 0;
}

.p10-form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.p10-form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.p10-form-group input[type="text"],
.p10-form-group input[type="email"],
.p10-form-group input[type="tel"],
.p10-form-group input[type="url"],
.p10-form-group input[type="number"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fafafa;
}

.p10-form-group input:focus {
    outline: none;
    border-color: #c0392b;
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12);
    background: #fff;
}

.p10-has-error input,
.p10-has-error .p10-file-label {
    border-color: #dc3232 !important;
}

.p10-field-error {
    font-size: 12px;
    color: #dc3232;
    margin-top: 2px;
}

.p10-field-hint {
    font-size: 12px;
    color: #777;
    margin: 0 0 6px;
    line-height: 1.5;
}

.p10-required  { color: #c0392b; }
.p10-opcional  { font-weight: 400; color: #999; font-size: 12px; }

/* --------------------------------------------------------------------------
   Toggle imagen / video
   -------------------------------------------------------------------------- */
.p10-tipo-media-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.p10-tipo-media-opcion {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border: 2px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
    background: #fafafa;
    user-select: none;
}

.p10-tipo-media-opcion input[type="radio"] {
    display: none;
}

.p10-tipo-media-opcion:hover {
    border-color: #c0392b;
    color: #c0392b;
    background: #fff5f4;
}

.p10-tipo-media-opcion.p10-tipo-activo {
    border-color: #c0392b;
    background: #c0392b;
    color: #fff;
}

/* --------------------------------------------------------------------------
   Campo de archivo (drag & drop)
   -------------------------------------------------------------------------- */
.p10-file-area {
    position: relative;
}

.p10-file-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.p10-file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    background: #fafafa;
}

.p10-file-label:hover,
.p10-file-area.p10-drag-over .p10-file-label {
    border-color: #c0392b;
    background: #fff5f4;
}

.p10-file-icon { font-size: 36px; line-height: 1; }

.p10-file-text {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

.p10-file-text strong { color: #c0392b; }

/* Vista previa de imagen */
.p10-preview-banner {
    margin-top: 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #f4f4f4;
}

.p10-preview-banner img {
    display: block;
    width: 100%;
    max-height: 180px;
    object-fit: contain;
}

.p10-preview-info {
    padding: 8px 12px;
    font-size: 12px;
    color: #666;
    background: #f8f8f8;
    border-top: 1px solid #ececec;
}

/* --------------------------------------------------------------------------
   Sección de días y precio
   -------------------------------------------------------------------------- */
.p10-form-row-precio {
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 24px;
}

.p10-dias-wrap {
    display: flex;
    align-items: center;
    gap: 0;
    margin-top: 4px;
    border: 1px solid #ccc;
    border-radius: 6px;
    overflow: hidden;
    width: fit-content;
}

.p10-dias-btn {
    background: #f0f0f0;
    border: none;
    padding: 10px 16px;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    color: #333;
    line-height: 1;
    transition: background 0.15s;
}
.p10-dias-btn:hover { background: #e0e0e0; }

.p10-dias-wrap input[type="number"] {
    width: 70px;
    text-align: center;
    border: none;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
    border-radius: 0;
    font-size: 18px;
    font-weight: 700;
    padding: 10px 4px;
    -moz-appearance: textfield;
}
.p10-dias-wrap input[type="number"]::-webkit-outer-spin-button,
.p10-dias-wrap input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
}
.p10-dias-wrap input:focus { box-shadow: none; border-color: #ccc; }

/* Cuadro de total */
.p10-total-wrap {
    background: linear-gradient(135deg, #c0392b 0%, #922b21 100%);
    border-radius: 10px;
    padding: 20px 28px;
    text-align: center;
    color: #fff;
    min-width: 180px;
}
.p10-total-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.85;
    margin-bottom: 6px;
}
.p10-total-monto {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}
.p10-total-detalle {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 6px;
}

/* --------------------------------------------------------------------------
   Botón de envío
   -------------------------------------------------------------------------- */
.p10-form-submit {
    text-align: center;
    margin-top: 8px;
}

.p10-btn-enviar {
    display: inline-block;
    background: #c0392b;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 16px 48px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    letter-spacing: 0.3px;
}
.p10-btn-enviar:hover  { background: #a93226; }
.p10-btn-enviar:active { transform: scale(0.98); }
.p10-btn-enviar:disabled { background: #bbb; cursor: not-allowed; }

.p10-submit-nota {
    font-size: 12px;
    color: #999;
    margin-top: 12px;
    line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Pantalla de confirmación
   -------------------------------------------------------------------------- */
.p10-confirmacion-wrap {
    text-align: center;
    padding: 20px 0;
}
.p10-confirmacion-icono {
    font-size: 56px;
    line-height: 1;
    margin-bottom: 16px;
}
.p10-confirmacion-titulo {
    font-size: 26px;
    font-weight: 700;
    color: #155724;
    margin: 0 0 8px;
}
.p10-confirmacion-subtitulo {
    font-size: 16px;
    color: #555;
    margin-bottom: 28px;
}

/* Resumen del pedido */
.p10-resumen-pedido {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px 24px;
    margin: 0 auto 24px;
    max-width: 480px;
    text-align: left;
}
.p10-resumen-pedido h3 { margin: 0 0 14px; font-size: 16px; }
.p10-resumen-tabla { width: 100%; border-collapse: collapse; font-size: 14px; }
.p10-resumen-tabla th,
.p10-resumen-tabla td {
    padding: 8px 6px;
    border-bottom: 1px solid #eee;
    text-align: left;
}
.p10-resumen-tabla th { color: #666; font-weight: 600; width: 120px; }
.p10-resumen-total th,
.p10-resumen-total td { border-bottom: none; padding-top: 12px; font-size: 16px; }

/* Banner preview */
.p10-resumen-banner { margin-bottom: 24px; }
.p10-resumen-banner h3 { font-size: 16px; margin-bottom: 10px; }
.p10-banner-preview-frame {
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    background: #f4f4f4;
    max-width: 100%;
}
.p10-banner-preview-frame img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 160px;
    object-fit: contain;
}
.p10-hint { font-size: 12px; color: #999; margin-top: 6px; }

/* Botón de pago */
.p10-pago-wrap { margin-bottom: 28px; }
.p10-pago-aviso { font-size: 14px; color: #555; margin-bottom: 14px; }
.p10-btn-pagar {
    display: inline-block;
    background: #27ae60;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 16px 48px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}
.p10-btn-pagar:hover:not(:disabled) { background: #219a52; }
.p10-btn-pagar:disabled { background: #bbb; cursor: not-allowed; }

/* Pasos siguientes */
.p10-pasos-wrap {
    background: #f0f8ff;
    border-radius: 10px;
    padding: 20px 24px;
    margin: 0 auto 24px;
    max-width: 480px;
    text-align: left;
}
.p10-pasos-wrap h3 { margin: 0 0 14px; font-size: 16px; }
.p10-pasos { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.p10-pasos li { display: flex; align-items: flex-start; gap: 12px; }
.p10-paso-icon { font-size: 22px; flex-shrink: 0; margin-top: 2px; }
.p10-pasos strong { display: block; font-size: 14px; }
.p10-pasos small { font-size: 12px; color: #666; }

/* Botón volver */
.p10-btn-volver {
    display: inline-block;
    color: #c0392b;
    font-size: 14px;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}
.p10-btn-volver:hover { border-color: #c0392b; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
    .p10-form-section { padding: 18px 16px; }
    .p10-form-row { grid-template-columns: 1fr; }
    .p10-form-row-precio { grid-template-columns: 1fr; }
    .p10-total-wrap { width: 100%; min-width: unset; }
    .p10-form-header h2 { font-size: 22px; }
    .p10-btn-enviar { width: 100%; padding: 16px; }
}
