/* === CONTENEDOR PRINCIPAL === */
.yagyas-container {
    width: 900px !important;
    max-width: 900px !important;
    min-width: 900px !important;
    margin: 20px auto;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #2c3e50;
    box-sizing: border-box;
}

/* === ENCABEZADO === */
.yagya-section-header {
    background: #2e7d32;
    color: white;
    padding: 18px 25px;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: background 0.3s;
    width: 100%;
    box-sizing: border-box;
}

.yagya-section-header:hover { background: #1b5e20; }

.yagya-section-header span:first-child {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 20px;
    font-size: 18px;
}

.yagya-section-header .icon {
    min-width: 30px;
    text-align: center;
    font-weight: bold;
    font-size: 20px;
}

.yagya-section-content {
    display: none;
    border-top: 1px solid #c8e6c9;
    padding: 15px;
    animation: fadeIn 0.3s ease;
}

.yagya-section-content.active { display: block; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* === LISTA DE ITEMS (CARDS) === */
.yagya-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.yagya-item-card {
    background: #f8fdf8;
    border: 1px solid #d0e8d0;
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.yagya-item-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.yagya-item-name {
    flex: 1;
    min-width: 200px;
    font-weight: 600;
    color: #1b5e20;
    font-size: 16px;
    white-space: normal;
    line-height: 1.4;
}

.yagya-item-price {
    font-weight: 700;
    color: #2e7d32;
    font-size: 18px;
    min-width: 100px;
    text-align: center;
}

.yagya-item-action {
    min-width: 110px;
    text-align: center;
}

.pay-btn {
    display: inline-block;
    text-decoration: none;
    background: #e74c3c;
    color: white;
    border: none;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    width: auto;
    min-width: 100px;
    line-height: 1.2;
    text-align: center;
    box-sizing: border-box;
}

.pay-btn:hover:not(:disabled) {
    background: #1976d2; /* azul */
    color: #ffffff; /* texto blanco */
    transform: translateY(-1px);
}

.pay-btn.loading::after {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Focus visible for keyboard users */
.pay-btn:focus {
    outline: 3px solid rgba(46,125,50,0.18);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.loading {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
}

.login-prompt {
    text-align: center;
    color: #d32f2f;
    font-style: italic;
    padding: 20px;
    background: #fff5f5;
    border-radius: 8px;
    margin: 15px;
}

/* Ajustes para mostrar descripción y botón al lado (manteniendo colores) */
.yagya-item-main {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.yagya-item-desc {
    margin-top: 6px;
    color: rgba(44,62,80,0.75);
    font-size: 14px;
    line-height: 1.4;
}

/* Contenedor derecho: precio + acción alineados a la derecha */
.yagya-item-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    min-width: 140px;
}

/* Asegura que el botón use los estilos existentes (pay-btn) y se vea bien */
.yagya-item-action { min-width: 110px; text-align: center; }

/* Responsive: apilar en móviles y mantener orden legible */
@media (max-width: 768px) {
    .yagyas-container {
        width: 100% !important;
        max-width: none !important;
        min-width: auto !important;
        margin: 10px;
        border-radius: 10px;
    }

    .yagya-section-header {
        padding: 16px 18px;
        font-size: 18px;
    }

    .yagya-section-header span:first-child {
        font-size: 16px;
        padding-right: 15px;
    }

    .yagya-section-header .icon {
        min-width: 28px;
        font-size: 18px;
    }

    .yagya-section-content {
        padding: 12px;
    }

    .yagya-item-card {
        padding: 14px;
        gap: 10px;
        flex-direction: column;
        align-items: stretch;
    }

    .yagya-item-name {
        min-width: auto;
        font-size: 15px;
        text-align: left;
    }

    .yagya-item-price {
        font-size: 17px;
        text-align: left;
        order: -1;
        font-weight: 700;
    }

    .yagya-item-action {
        min-width: auto;
        text-align: center;
    }

    .pay-btn {
        padding: 12px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .yagyas-container { margin: 8px; }
    .yagya-section-header { padding: 14px 16px; font-size: 17px; }
    .yagya-item-card { padding: 12px; }
}

/* PROTECCIÓN CONTRA GTRANSLATE (GRATIS) */
.pay-btn {
    unicode-bidi: plaintext !important;
    direction: ltr !important;
}

/* FIX: BOTONES DONATE RESPONSIVOS Y SIN RETRASO */
.yagya-item-card,
.yagya-item-action,
.pay-btn {
    position: relative !important;
    z-index: 10 !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
}

.pay-btn {
    outline: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -webkit-tap-highlight-color: transparent !important;
    cursor: pointer !important;
}

.pay-btn:active {
    transform: translateY(1px) !important;
    background: #068129 !important; /* verde oscuro en activo */
    color: #ffffff !important;
}

.yagya-item-card * {
    pointer-events: auto !important;
}