/**
 * Estilos de Mi Cuenta y Shortcodes Congreso
 */

/* ===========================================
   VARIABLES Y ESTILOS BASE
   =========================================== */

:root {
    --congreso-gold: #9a7b4f;
    --congreso-gold-dark: #7d6340;
    --congreso-text: #333;
    --congreso-bg: #fff;
}

/* ===========================================
   TITULO CON LINEA DECORATIVA
   =========================================== */

.congreso-section-titulo {
    text-align: center;
    color: var(--congreso-gold);
    font-size: 1.8rem;
    font-weight: 700;
    text-transform: uppercase;
    margin: 30px auto 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--congreso-gold);
    display: block;
    max-width: 600px;
}

/* Contenedor general para contenido de página */
.congreso-precios-tabla,
.congreso-curso-notas {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* ===========================================
   SHORTCODE CURSO
   =========================================== */

.congreso-curso-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.congreso-curso-notas {
    text-align: center;
    margin-bottom: 25px;
    color: #c00;
    font-size: 0.95rem;
}

.congreso-curso-notas p {
    margin: 5px 0;
}

/* Tabla de precios del curso */
.congreso-precios-tabla {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    font-size: 0.9rem;
}

.congreso-precios-tabla th {
    background: var(--congreso-gold);
    color: #fff;
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    border: 1px solid var(--congreso-gold-dark);
}

.congreso-precios-tabla td {
    background: #fff;
    padding: 15px 10px;
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
    border: 1px solid #ddd;
}

.congreso-curso-accion {
    text-align: center;
    margin-top: 25px;
}

.congreso-curso-comprado {
    display: inline-block;
    padding: 12px 30px;
    background: #d4edda;
    color: #155724;
    border-radius: 6px;
    font-weight: 600;
}

.btn-inscribir-curso {
    display: inline-block;
    padding: 12px 35px;
    background: var(--congreso-gold);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-inscribir-curso:hover {
    background: var(--congreso-gold-dark);
    color: #fff;
}

.btn-inscribir-curso:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* ===========================================
   CURSO VARIABLE - TABS Y SELECCION
   =========================================== */

.congreso-periodo-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.congreso-periodo-tab {
    padding: 10px 25px;
    border: 2px solid var(--congreso-gold);
    background: #fff;
    color: var(--congreso-gold);
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
}

.congreso-periodo-tab:hover {
    background: var(--congreso-gold);
    color: #fff;
}

.congreso-periodo-tab.active {
    background: var(--congreso-gold);
    color: #fff;
}

/* Ocultar tablas inactivas */
.congreso-periodo-content {
    display: none;
}

.congreso-periodo-content.active {
    display: table;
}

/* Celdas seleccionables */
.congreso-precio-cell.selectable {
    cursor: pointer;
    transition: all 0.2s;
}

.congreso-precio-cell.selectable:hover {
    background: #f0e6d3;
}

.congreso-precio-cell.selected {
    background: #c5a87d !important;
    color: #fff;
}

.congreso-precio-cell.selected .precio-valor {
    color: #fff;
}

/* ===========================================
   CARRITO - OCULTAR CANTIDAD PARA CURSOS/TALLERES
   =========================================== */

.woocommerce-cart-form .cart_item.congreso-qty-fixed .product-quantity {
    pointer-events: none;
}

.woocommerce-cart-form .cart_item.congreso-qty-fixed .product-quantity input {
    display: none;
}

.woocommerce-cart-form .cart_item.congreso-qty-fixed .product-quantity::after {
    content: "1";
    font-weight: 600;
}

/* ===========================================
   SHORTCODE TALLERES - TABLA
   =========================================== */

.congreso-talleres-section {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
}

.congreso-talleres-tabla {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.congreso-talleres-tabla th {
    background: var(--congreso-gold);
    color: #fff;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    border: 1px solid var(--congreso-gold-dark);
}

.congreso-talleres-tabla td {
    padding: 12px 15px;
    border: 1px solid #ddd;
    background: #fff;
}

.congreso-talleres-tabla td:first-child,
.congreso-talleres-tabla th:first-child {
    padding-left: 20px;
}

.congreso-talleres-tabla tbody tr:nth-child(even) td {
    background: #f9f9f9;
}

.congreso-talleres-tabla .taller-nombre {
    font-weight: 600;
    color: var(--congreso-gold-dark);
}

.congreso-talleres-tabla .taller-horario {
    color: #666;
}

.congreso-talleres-tabla .taller-precio {
    font-weight: 700;
    text-align: center;
}

.congreso-talleres-tabla .taller-accion {
    text-align: center;
}

.estado-inscrito {
    display: inline-block;
    padding: 6px 12px;
    background: #d4edda;
    color: #155724;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.estado-bloqueado {
    display: inline-block;
    padding: 6px 12px;
    background: #f8f9fa;
    color: #6c757d;
    border-radius: 4px;
    font-size: 0.85rem;
}

.estado-en-carrito {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.btn-quitar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #c62828;
    color: #fff;
    text-decoration: none;
    border-radius: 50%;
    font-size: 14px;
    line-height: 1;
}

.btn-quitar:hover {
    background: #8e0000;
    color: #fff;
}

.btn-inscribir {
    display: inline-block;
    padding: 6px 15px;
    background: var(--congreso-gold);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-inscribir:hover {
    background: var(--congreso-gold-dark);
    color: #fff;
}

/* Boton ver carrito en talleres */
.congreso-talleres-accion {
    text-align: center;
    margin-top: 25px;
}

.btn-ver-carrito {
    display: inline-block;
    padding: 12px 35px;
    background: #1a7f45;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-ver-carrito:hover {
    background: #145c33;
    color: #fff;
}

/* ===========================================
   SHORTCODE TICKETS - TABLA
   =========================================== */

.congreso-tickets-section {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
}

.congreso-tickets-tabla .ticket-nombre {
    font-weight: 600;
    color: var(--congreso-gold-dark);
}

.congreso-tickets-tabla .ticket-precio {
    font-weight: 700;
    text-align: center;
}

.congreso-tickets-tabla .ticket-accion {
    text-align: center;
}

/* ===========================================
   RESPONSIVE
   =========================================== */

@media screen and (max-width: 768px) {
    .congreso-precios-tabla th,
    .congreso-precios-tabla td {
        padding: 8px 5px;
        font-size: 0.75rem;
    }

    .congreso-precios-tabla td {
        font-size: 0.95rem;
    }

    .congreso-talleres-tabla {
        font-size: 0.9rem;
    }
}

@media screen and (max-width: 480px) {
    .congreso-precios-tabla {
        display: block;
        overflow-x: auto;
    }

    .congreso-talleres-tabla th:nth-child(2),
    .congreso-talleres-tabla td:nth-child(2) {
        display: none;
    }
}

/* ===========================================
   MI CUENTA - QR
   =========================================== */

.congreso-qr-page {
    max-width: 500px;
}

.congreso-qr-page h2 {
    margin-bottom: 20px;
}

.qr-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
}

.qr-user-info {
    margin-bottom: 20px;
}

.qr-user-info .user-name {
    font-size: 20px;
    margin: 0 0 5px;
}

.qr-user-info .user-especialidad {
    color: #666;
    margin: 0;
}

.qr-code-container {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 0 auto 20px;
    width: 400px;
    display: block;
}

.qr-code-container img,
.qr-code-container svg {
    max-width: 280px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.qr-instructions {
    text-align: left;
    background: #e7f3ff;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.qr-instructions p {
    margin: 0 0 10px;
}

.qr-instructions ol {
    margin: 0;
    padding-left: 20px;
}

.qr-instructions li {
    margin: 8px 0;
    color: #333;
}

.qr-actions {
    margin-top: 20px;
}

.qr-actions .button {
    padding: 10px 30px;
}

/* Productos comprados */
.qr-products {
    margin-top: 30px;
    text-align: left;
}

.qr-products h3 {
    margin-bottom: 15px;
    font-size: 16px;
}

.qr-products-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.qr-product-curso {
    padding: 10px 15px;
    background: #f8f9fa;
    margin-bottom: 8px;
    border-radius: 4px;
    border-left: 3px solid #0073aa;
    font-weight: 600;
}

/* Talleres dentro del curso */
.qr-product-talleres {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
}

.qr-product-talleres li {
    padding: 8px 12px;
    background: #fff;
    margin: 6px 0 6px 20px;
    border-radius: 4px;
    border-left: 2px solid #9a7b4f;
    font-weight: normal;
    font-size: 14px;
}

/* Paginación */
.qr-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.qr-pagination-prev,
.qr-pagination-next {
    display: inline-block;
    padding: 8px 16px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s;
}

.qr-pagination-prev:hover,
.qr-pagination-next:hover {
    background: #005177;
    color: #fff;
}

.qr-pagination-info {
    font-size: 14px;
    color: #666;
}

/* Responsive */
@media screen and (max-width: 480px) {
    .qr-card {
        padding: 15px;
    }

    .qr-code-container {
        padding: 15px;
    }

    .qr-code-container img,
    .qr-code-container svg {
        max-width: 220px;
    }
}

/* ===========================================
   CHECKOUT - ESPECIALIDAD
   =========================================== */

/* Asegurar que especialidad ocupe 100% de ancho */
#congreso_especialidad_field {
    width: 100% !important;
}
