/* ==========================================================================
   GESGolf Gare (layout + modali) — CSS personalizzabile
   ========================================================================== */

:root{
  --gg-accent: #e4872a;      /* arancio bottoni e icone */
  --gg-accent-2: #ff8a00;    /* arancio label “RICERCA GARE” */
  --gg-text: #555;
  --gg-muted: #888;
  --gg-border: #eaeaea;
  --gg-bg: #ffffff;

  --gg-date-bg: #f6e7a6;
  --gg-date-text: #666;

  --gg-radius: 14px;
  --gg-radius-sm: 6px;
  --gg-shadow: 0 15px 50px rgba(0,0,0,.35);

  --gg-font: inherit;
  --gg-title-size: 36px;
  --gg-sub-size: 20px;

  --gg-gap: 18px;
  --gg-pad: 16px;

  --gg-modal-w: 1100px;
  --gg-modal-h: 80vh;
}

/* Wrapper */
.gesgolf-wrap{
  font-family: var(--gg-font);
  max-width: 100%;
}

/* Heading */
.gesgolf-heading{
  color: var(--gg-accent-2);
  font-weight: 800;
  margin-bottom: 10px;
}

/* Filtri */
.gesgolf-filters{
  display:flex;
  gap:14px;
  align-items:flex-end;
  flex-wrap:wrap;
}

.gesgolf-filters label{
  display:flex;
  flex-direction:column;
  gap:6px;
  font-size:14px;
  color: var(--gg-accent-2);
  font-weight: 700;
}

.gesgolf-filters select{
  min-width: 220px;
  padding:10px 12px;
  border:1px solid #ddd;
  border-radius:4px;
  background:#fff;
}

.gesgolf-btn{
  padding:10px 18px;
  border:0;
  background: var(--gg-accent);
  color:#fff;
  border-radius:3px;
  cursor:pointer;
  font-weight:800;
}

.gesgolf-btn:disabled{
  opacity:.6;
  cursor:not-allowed;
}

/* Output */
.gesgolf-output{ margin-top: 18px; }
.gesgolf-loading{ font-style: italic; opacity:.75; }
.gesgolf-error{ color:#b00020; font-weight: 800; }

/* Lista gare */
.gesgolf-list{
  display:flex;
  flex-direction:column;
  gap: var(--gg-gap);
}

.gesgolf-row{
  display:flex;
  gap: var(--gg-gap);
  align-items:stretch;
  border-bottom:1px solid var(--gg-border);
  padding-bottom: var(--gg-gap);
}

/* Box data */
.gesgolf-datebox{
  width:110px;
  min-width:110px;
  background: var(--gg-date-bg);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  border-radius:2px;
}

.gesgolf-day{
  font-size:52px;
  line-height:1;
  font-weight:800;
  color: var(--gg-date-text);
  margin-top:6px;
}

.gesgolf-dow{
  font-size:26px;
  font-weight:800;
  color: var(--gg-date-text);
  margin-bottom:10px;
  text-transform: lowercase;
}

/* Titolo e descrizione */
.gesgolf-main{ flex:1; }

.gesgolf-title{
  font-size: var(--gg-title-size);
  font-weight:800;
  color: var(--gg-text);
  margin:0 0 6px 0;
}

.gesgolf-sub{
  font-size: var(--gg-sub-size);
  color: var(--gg-muted);
  margin:0 0 12px 0;
}

/* Icone/bottoni */
.gesgolf-icons{
  display:flex;
  gap:26px;
  flex-wrap:wrap;
  align-items:center;
}

.gesgolf-icoBtn{
  display:inline-flex;
  align-items:center;
  gap:10px;
  border:0;
  background:transparent;
  cursor:pointer;
  color: var(--gg-accent);
  font-size: 18px;
  font-weight:800;
  padding:6px 0;
}

.gesgolf-icoBtn:hover{ opacity:.85; }
.gesgolf-ico{ font-size:22px; }

/* Modale */
.gesgolf-modal-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.6);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:999999;
}

.gesgolf-modal{
  width: min(var(--gg-modal-w), 92vw);
  height: min(var(--gg-modal-h), 800px);
  background: var(--gg-bg);
  border-radius: var(--gg-radius);
  box-shadow: var(--gg-shadow);
  display:flex;
  flex-direction:column;
  overflow:hidden;
}

.gesgolf-modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 16px;
  border-bottom:1px solid #eee;
}

.gesgolf-modal-title{
  font-size: 18px;
  font-weight:900;
  color:#333;
  margin:0;
}

.gesgolf-modal-close{
  border:0;
  background:#f3f3f3;
  border-radius: 10px;
  padding:8px 10px;
  cursor:pointer;
  font-weight:900;
}

.gesgolf-modal-body{
  padding: var(--gg-pad);
  overflow:auto;
  flex:1;
}

/* Tabelle nel modale */
.gesgolf-modal-body table{
  width:100%;
  border-collapse:collapse;
}

.gesgolf-modal-body th,
.gesgolf-modal-body td{
  border-bottom:1px solid #eee;
  padding:10px 8px;
  text-align:left;
  font-size:14px;
}

.gesgolf-modal-body th{
  background:#fafafa;
  font-weight:900;
}

/* PDF embed */
.gesgolf-pdf{
  width:100%;
  height:100%;
  min-height:65vh;
  border:0;
}

.gesgolf-openext{
  display:inline-block;
  margin-top:10px;
}

																	  
.gesgolf-classifiche-top{
  display:flex;
  gap:10px;
  align-items:center;
  margin-bottom:12px;
}

.gesgolf-class-label{
  font-weight:600;
}

.gesgolf-class-select{
  width:100%;
  max-width:420px;
  padding:10px;
  border-radius:10px;
  border:1px solid #ddd;
}

.gesgolf-class-title{
  margin: 10px 0 12px 0;
  font-size: 18px;
  font-weight: 700;
}
																	  
																	  
/* Mobile */
@media (max-width: 760px){
  .gesgolf-row{ flex-direction:column; }
  .gesgolf-datebox{
    width:100%;
    min-width:unset;
    flex-direction:row;
    gap:14px;
    padding:12px;
    justify-content:flex-start;
  }
  .gesgolf-day{ font-size:42px; margin:0; }
  .gesgolf-dow{ font-size:22px; margin:0; }
  .gesgolf-title{ font-size:28px; }
  .gesgolf-sub{ font-size:16px; }
}
