/*
 Theme Name: Homey Child
 Theme URI: https://example.com
 Description: Child theme para Homey
 Author: Alfonso
 Template: homey
 Version: 1.0
*/
/* ============================================
   ESTILOS PARA LISTADO DE FACTURAS
   ============================================ */

.dashboard-invoices-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dashboard-invoice-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #e9f6ff; /* azul Homey dashboard */
    border-radius: 6px;
    padding: 16px 20px;
    margin-bottom: 12px;
    border: 1px solid #d3e9f9;
}

.dashboard-invoice-item:hover {
    background: #e1f2ff;
    border-color: #bcdcf4;
}

/* BLOQUE IZQUIERDO */
.invoice-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 70%;
}

.invoice-title {
    font-size: 15px;
    font-weight: 600;
    color: #1b1b1b;
}

.invoice-meta {
    font-size: 13px;
    color: #4a4a4a;
}

.invoice-meta span {
    display: inline-block;
    margin-right: 12px;
}

/* BLOQUE DERECHO (ACCIONES) */
.invoice-actions {
    display: flex;
    gap: 10px;
}

.invoice-actions .btn-slim {
    padding: 6px 12px !important;
    font-size: 12px !important;
    border-radius: 4px !important;
}

/* BOTON: VER PDF */
.invoice-actions .btn-primary {
    background-color: #007cba;
    border-color: #007cba;
}

/* BOTON: DESCARGAR */
.invoice-actions .btn-secondary {
    background-color: #35495e;
    border-color: #35495e;
}

.invoice-actions .btn-primary:hover {
    background-color: #006ba3;
    border-color: #006ba3;
}

.invoice-actions .btn-secondary:hover {
    background-color: #2a3d50;
    border-color: #2a3d50;
}

/* ====================
   RESPONSIVE
   ==================== */

@media (max-width: 768px) {

    .dashboard-invoice-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .invoice-main {
        max-width: 100%;
    }

    .invoice-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .invoice-actions .btn-slim {
        padding: 7px 14px !important;
        font-size: 13px !important;
    }
}

/* ============================================
   DASHBOARD RESERVATIONS - LAYOUT (AISLADO)
   ============================================ */

/* Solo nuestro modulo */
.cm-owner-availability{
  padding: 20px;
  box-sizing: border-box;
}

/* Grid responsive del calendario */
.cm-owner-availability .owner-cal-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 1199px){
  .cm-owner-availability .owner-cal-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px){
  .cm-owner-availability .owner-cal-grid{
    grid-template-columns: 1fr;
  }
}

/* Compensacion contra header/sticky: dejamos espacio arriba del modulo */
.cm-owner-availability{
  margin-top: 20px;
}

/* ============================================
    ESTILOS PARA DASHBOARD RESERVATIONS - CALENDARIO
    ============================================ */
.owner-cal-month {
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 10px;
  padding: 10px;
  background: #fff;
}

.owner-cal-month-title {
  font-weight: 600;
  margin-bottom: 8px;
}

.owner-cal-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.owner-cal-table th {
  font-size: 11px;
  opacity: .65;
  text-align: center;
  padding: 4px 0;
}

.owner-cal-table td {
  text-align: center;
  padding: 3px 0;
}

.owner-cal-table td.day span {
  display: inline-flex;
  width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.owner-cal-table td.day.occupied span {
  background: rgba(220, 53, 69, .16);
  font-weight: 700;
}

.owner-cal-table td.day.past span {
  opacity: .55;
}

.owner-cal-table td.empty {
  opacity: 0;
}

:root{
  --cm-header-offset: 0px;
}

/* Mantener sticky/fixed pero con offset estable */
#body-area .dashboard-page-title{
  top: var(--cm-header-offset) !important;
  z-index: 999;            /* por encima del contenido */
  background: #fff;        /* evita transparencias */
  padding-top: 6px;
  padding-bottom: 6px;
}


/* Grid responsive para calendario anual (dashboard reservations) */
.owner-cal-grid{
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Tablets / pantallas medias: 2 columnas */
@media (max-width: 1199px){
  .owner-cal-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Movil: 1 columna (evita solapes) */
@media (max-width: 767px){
  .owner-cal-grid{
    grid-template-columns: 1fr;
  }

  /* Ajustes extra para que no se “aprieten” los numeros */
  .owner-cal-table td.day span{
    width: 30px;
    height: 30px;
    font-size: 13px;
  }
}

/* Hint tooltip para dias ocupados */
#cm-reservation-hint{
  position: fixed;
  z-index: 999999;
  transform: translateX(-50%);
  background: #111;
  color: #fff;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.25;
  box-shadow: 0 10px 25px rgba(0,0,0,.18);
  max-width: 220px;
  pointer-events: none;
}

#cm-reservation-hint .cm-hint-title{
  font-weight: 700;
  margin-bottom: 6px;
}

#cm-reservation-hint .cm-hint-row{
  margin-top: 3px;
  opacity: .95;
}

/* opcional: cursor para indicar que hay info */
.owner-cal-table td.day.occupied{
  cursor: pointer;
}
