/* pages/oracion/css/oracion.css */

/* ── Wrapper principal ── */
#oracion-section {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 70px 0 160px;
    background: var(--body-color);
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}
#oracion-section.active-section { opacity: 1; }

.oracion-wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ── Cabecera ── */
.oracion-header {
    text-align: center;
    padding: 20px 0 10px;
}
.oracion-header-icon {
    font-size: 3rem;
    margin-bottom: 8px;
    display: block;
}
.oracion-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 6px;
}
.oracion-subtitle {
    font-size: 0.9rem;
    color: var(--text-sub);
}

/* ── Tabs ── */
.oracion-tabs {
    display: flex;
    gap: 10px;
    margin: 20px 0 16px;
}
.oracion-tab {
    flex: 1;
    padding: 10px;
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    background: transparent;
    color: var(--text-sub);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.oracion-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(182,25,66,0.4);
}

/* ── Formulario ── */
.oracion-form-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 16px;
}
body.light .oracion-form-card {
    background: #fff;
    border-color: rgba(0,0,0,0.1);
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}
.oracion-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.oracion-form-header span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
}
.oracion-form-header button {
    background: none;
    border: none;
    color: var(--text-sub);
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.3s;
}
.oracion-form-header button.collapsed {
    transform: rotate(-90deg);
}
#oracion-form-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: hidden;
    transition: max-height 0.4s ease;
    max-height: 400px;
}
#oracion-form-body.hidden {
    max-height: 0;
}
#oracion-nombre,
#oracion-mensaje {
    width: 100%;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    color: var(--text-color);
    padding: 10px 12px;
    font-size: 0.9rem;
    font-family: inherit;
    resize: none;
    transition: border-color 0.2s;
}
body.light #oracion-nombre,
body.light #oracion-mensaje {
    background: #f5f5f5;
    border-color: #ddd;
    color: #333;
}
#oracion-nombre:focus,
#oracion-mensaje:focus {
    outline: none;
    border-color: var(--primary);
}
.oracion-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
#oracion-char-count {
    font-size: 0.75rem;
    color: var(--text-sub);
}
#btn-enviar-oracion {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: opacity 0.2s;
}
#btn-enviar-oracion:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
#oracion-form-msg {
    font-size: 0.82rem;
    min-height: 18px;
    text-align: center;
}

/* ── Lista de peticiones ── */
.oracion-lista {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.oracion-loading {
    text-align: center;
    padding: 30px;
    color: var(--text-sub);
    font-size: 0.9rem;
}
.oracion-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 14px 16px;
    transition: border-color 0.3s;
    animation: fadeInCard 0.4s ease;
}
body.light .oracion-card {
    background: #fff;
    border-color: rgba(0,0,0,0.08);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
@keyframes fadeInCard {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.oracion-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.oracion-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: white;
    font-weight: bold;
    flex-shrink: 0;
}
.oracion-card-meta {
    flex: 1;
}
.oracion-card-nombre {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-color);
}
.oracion-card-tiempo {
    font-size: 0.75rem;
    color: var(--text-sub);
}
.oracion-tipo-badge {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 600;
}
.badge-oracion {
    background: rgba(182,25,66,0.15);
    color: var(--primary);
    border: 1px solid rgba(182,25,66,0.3);
}
.badge-testimonio {
    background: rgba(149,117,206,0.15);
    color: var(--secondary);
    border: 1px solid rgba(149,117,206,0.3);
}
.oracion-card-mensaje {
    font-size: 0.88rem;
    color: var(--text-color);
    line-height: 1.55;
    margin-bottom: 12px;
}
.oracion-card-footer {
    display: flex;
    justify-content: flex-end;
}
.btn-orar {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px;
    padding: 6px 14px;
    color: var(--text-sub);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
}
body.light .btn-orar {
    background: #f5f5f5;
    border-color: #ddd;
}
.btn-orar:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.btn-orar.activo {
    background: rgba(182,25,66,0.15);
    border-color: var(--primary);
    color: var(--primary);
}
.btn-orar .orar-count {
    font-weight: 800;
}

/* ── Sin resultados ── */
.oracion-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-sub);
}
.oracion-empty i {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: block;
    opacity: 0.4;
}

/* ── Paginación ── */
.oracion-paginacion {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 20px 0;
    flex-wrap: wrap;
}
.btn-pagina {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);
    background: transparent;
    color: var(--text-sub);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-pagina.activa {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* ── Modo claro ajustes ── */
body.light .oracion-tab {
    border-color: #ddd;
    color: #666;
}
body.light .btn-orar {
    color: #666;
}

/* ── Botón volver al Hub ─────────────────────────────────────
   AÑADIR AL FINAL de pages/oracion/css/oracion.css
   ─────────────────────────────────────────────────────────── */

.oracion-header {
    position: relative; /* necesario para el botón absoluto */
}

.oracion-btn-volver {
    position: absolute;
    top: 20px;
    left: 0;
    width: 86px;
    height: 36px;
    background: rgba(255,255,255,0.07);
    border: 1px solid var(--glass-border);
    color: var(--text-sub);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.oracion-btn-volver:hover,
.oracion-btn-volver:active {
    background: rgba(182,25,67,0.2);
    color: white;
    border-color: rgba(182,25,67,0.5);
}

body.light .oracion-btn-volver {
    background: rgba(0,0,0,0.05);
    border-color: rgba(0,0,0,0.1);
    color: #666;
}

