/* Frontend styles for WCD Event Manager */
/* Containers */
.wcd-em-archive.container,
.wcd-em-content.container,
.wcd-em-schedule-tabs.container{max-width:1100px;margin-left:auto;margin-right:auto;padding:0 16px}
.wcd-em-page.container{width:100%;max-width:1100px;margin-left:auto;margin-right:auto;padding:0 16px}
.wcd-em-date,.wcd-em-location{color:#555;margin:4px 0}
.wcd-em-card{background:#fff;border:1px solid #e9ecef;border-radius:12px;padding:18px;margin-bottom:18px;box-shadow:0 1px 2px rgba(0,0,0,.03)}
.wcd-em-map iframe{width:100%;height:260px;border:0;border-radius:8px}
.wcd-em-card img, .wcd-em-card iframe{max-width:100%;height:auto;display:block}

/* Page grid */
.wcd-em-page{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);grid-auto-rows:auto;gap:24px 32px;margin:24px auto;grid-template-areas:"banner side" "main side"}
.wcd-em-page, .wcd-em-card, .wcd-em-side, .wcd-em-main{min-width:0;overflow-wrap:anywhere;word-break:break-word}
.wcd-em-banner{grid-area:banner}
.wcd-em-banner img{width:100%;height:auto;border-radius:12px}
.wcd-em-side{grid-area:side;display:flex;flex-direction:column;gap:16px}
.wcd-em-main{grid-area:main}
.wcd-em-actions{display:flex;flex-wrap:wrap;gap:8px}
.wcd-em-title{margin:0 0 8px;font-size:clamp(1.6rem,2.5vw,2.4rem);line-height:1.2}
.wcd-em-card .button, .wcd-em-ticket-btn{display:inline-flex;align-items:center;gap:6px;border:1px solid #cbd5dc;background:transparent;color:#111;border-radius:8px;padding:8px 12px;text-decoration:none;cursor:pointer;font-weight:400}
.wcd-em-card .button:hover, .wcd-em-ticket-btn:hover{background:#f4f7fb}
.wcd-em-card .button.button-primary, .wcd-em-ticket-btn{background:transparent;color:#0073aa;border-color:#0073aa}
.wcd-em-card .button.button-primary:hover, .wcd-em-ticket-btn:hover{background:#e6f1fb}
.wcd-em-side-card .wcd-em-section{margin-top:12px;padding-top:12px;border-top:1px solid #eef1f4}
.wcd-em-side-card .wcd-em-section:first-child{margin-top:0;padding-top:0;border-top:0}
.wcd-em-side-card h3{margin:0 0 8px;font-size:1rem;color:#333}
.wcd-em-free .wcd-em-free-fields{display:grid;grid-template-columns:1fr;gap:8px;margin-bottom:8px}
.wcd-em-free-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:10px}
.wcd-em-free-item{border:1px solid #eef1f4;border-radius:8px;padding:10px}
.wcd-em-free-ctrl{display:flex;align-items:center;gap:8px;margin-top:8px}
.wcd-em-free-left{color:#666;font-size:.9rem}
.wcd-em-free-msg{margin-top:8px;color:#0a7b2f}
.wcd-em-paid-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:10px}
.wcd-em-paid-item{border:1px solid #eef1f4;border-radius:8px;padding:10px}
.wcd-em-paid-head{display:flex;justify-content:space-between;align-items:center}
.wcd-em-paid-name{font-weight:600}
.wcd-em-paid-price{font-weight:700}
.wcd-em-paid-ctrl{display:flex;align-items:center;gap:8px;margin-top:8px}
.wcd-em-paid-left{color:#666;font-size:.9rem}
.wcd-em-badge{display:inline-block;padding:4px 8px;border-radius:999px;font-size:.8rem;background:#eef2f7;color:#333;border:1px solid #d7dee6}
.wcd-em-badge.is-soldout{background:#ffeaea;color:#a40000;border-color:#ffb3b3}
.wcd-em-badge.is-upcoming{background:#fff6e5;color:#7a4b00;border-color:#ffd48a}
.wcd-em-badge.is-ended{background:#f3f4f6;color:#555;border-color:#e5e7eb}
.wcd-em-progress{position:relative;height:8px;background:#f1f5f9;border-radius:999px;overflow:hidden;margin-top:6px}
.wcd-em-progress-bar{position:absolute;left:0;top:0;height:100%;background:#0073aa}
/* Ticket controls split rows */
.wcd-em-t-ctrl1{display:flex;align-items:center;gap:10px;margin-top:8px}
.wcd-em-t-ctrl1 .wcd-em-progress{flex:1;margin:0}
.wcd-em-t-ctrl2{display:flex;align-items:center;gap:8px;margin-top:8px}

/* Inline notice */
.wcd-em-notice{padding:10px 12px;border-radius:8px;margin-bottom:10px;border:1px solid transparent}
.wcd-em-notice.is-success{background:#ecfdf5;border-color:#a7f3d0;color:#065f46}
.wcd-em-notice.is-warning{background:#fff7ed;border-color:#fed7aa;color:#7c2d12}
/* Organizatori heading hidden by default */
.wcd-em-org h3{display:none}
.wcd-em-org .wcd-em-meta{margin:4px 0}
/* Prevent horizontal overflow on mobile */
.wcd-em-page.container{overflow-x:hidden}

/* Tabs */
.wcd-em-tabs{margin-top:28px}
.wcd-em-tablist{display:flex;gap:8px;margin-bottom:12px;flex-wrap:wrap}
.wcd-em-tab{padding:8px 12px;border:1px solid #dde2e6;background:#f7f7f7;border-radius:8px;cursor:pointer}
.wcd-em-tab.is-active{background:#fff;border-color:#cbd5dc}
.wcd-em-tabpanel{display:none;border:1px solid #e5eaef;border-radius:12px;padding:14px;background:#fff;overflow-wrap:anywhere}
.wcd-em-tabpanel.is-active{display:block}
.wcd-em-sessions{list-style:none;padding:0;margin:0}
.wcd-em-session{display:grid;grid-template-columns:80px 1fr;gap:8px 14px;padding:12px 0;border-bottom:1px dashed #edf2f7}
.wcd-em-session:last-child{border-bottom:0}
.wcd-em-session-time{grid-column:1;color:#222;font-weight:700}
.wcd-em-session-title{grid-column:2;display:block;font-weight:600;color:#111}
.wcd-em-session-speakers{grid-column:2;color:#666}
.wcd-em-session-place{grid-column:2;color:#444;font-size:.95rem;margin-top:4px}
.wcd-em-session-desc{grid-column:2;color:#333;margin-top:6px;line-height:1.6}

/* Archive grid */
.wcd-em-archive .wcd-em-archive-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px;flex-wrap:wrap;gap:8px}
.wcd-em-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.wcd-em-card .wcd-em-thumb img{width:100%;height:auto;border-radius:10px}
.wcd-em-card{position:relative}
.wcd-em-card-badge{position:absolute;top:10px;left:10px;background:#111;color:#fff;padding:4px 8px;border-radius:6px;font-size:.8rem;opacity:.9}
.wcd-em-card-badge.is-expired{background:#8b0000}
.wcd-em-card-title{margin:10px 0 6px}
.wcd-em-card-date{color:#666;margin-bottom:8px}
.wcd-em-card-more{display:inline-block;margin-top:6px}

/* Calendar */
.wcd-em-calendar{border:1px solid #e5e5e5;border-radius:12px;padding:14px;background:#fff}
.wcd-em-cal-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}
.wcd-em-cal-title{font-weight:700}
.wcd-em-cal-grid{display:grid;gap:8px}
.wcd-em-cal-week{display:grid;grid-template-columns:repeat(7,1fr);gap:8px;color:#666;font-size:.9rem}
.wcd-em-cal-days{display:grid;grid-template-columns:repeat(7,1fr);gap:8px}
.wcd-em-cal-day{border:1px solid #eee;border-radius:10px;min-height:82px;padding:8px;position:relative;background:#fafafa;overflow:hidden}
.wcd-em-cal-day .date{position:absolute;top:8px;right:10px;font-size:.8rem;color:#666}
.wcd-em-cal-day.has-events{background:#eef7ff;border-color:#b8dbff}
.wcd-em-cal-day .badge{position:absolute;bottom:8px;left:8px;background:#0073aa;color:#fff;border-radius:12px;padding:2px 8px;font-size:.75rem}
.wcd-em-cal-day.is-today{outline:2px solid #0073aa}
.wcd-em-cal-day-events{margin-top:12px}
.wcd-em-cal-list{list-style:none;margin:0;padding:0}
.wcd-em-cal-list li{padding:6px 0;border-bottom:1px dashed #eee}
.wcd-em-view-toggle .button{margin-left:8px}
.wcd-em-filters{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0;}
.wcd-em-filters .field{display:flex;gap:6px;align-items:center}
.wcd-em-filters input[type="text"],
.wcd-em-filters select{padding:6px 8px;border:1px solid #dcdddd;border-radius:6px}
.wcd-em-filters input{height:36px;font-size:13px;height:36px}
.wcd-em-filters .button{padding:6px 10px;height: 36px;display: flex;align-items: center;}
.wcd-em-empty{padding:18px;border:1px dashed #cbd5dc;border-radius:10px;background:#fafcff}
.wcd-em-empty p{margin:6px 0}

/* Countdown */
.wcd-em-countdown .wcd-em-count-box{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:8px;font-size:1.05rem}
.wcd-em-countdown .wcd-em-count-box-time{display:grid;grid:auto/repeat(4,1fr);gap:16px;}
.wcd-em-countdown .wcd-em-count-box-time > span{display:grid;grid:1fr/1fr 1fr;gap:8px;text-align:center;}
.wcd-em-countdown .wcd-em-count{display:inline-block;min-width:28px;text-align:center;background:#0f172a;color:#fff;border-radius:6px;padding:4px 6px}
.wcd-em-card-badge{position:absolute;top:10px;left:10px;background:#111;color:#fff;padding:4px 8px;border-radius:6px;font-size:.8rem;opacity:.9}
.wcd-em-card-badge.is-expired{display:none}

/* Responsive */
@media (max-width:1024px){
  .wcd-em-page{grid-template-columns:1fr;grid-template-areas:"banner" "side" "main"}
}

@media (max-width:960px){
  .wcd-em-grid{grid-template-columns:repeat(2,1fr)}
  .wcd-em-session{grid-template-columns:72px 1fr}
  .wcd-em-countdown .wcd-em-count-box-time > span{display:grid;grid:1fr 1fr/1fr;gap:8px;text-align:center;}
}

@media (max-width:640px){
  .wcd-em-grid{grid-template-columns:1fr}
  .wcd-em-session{grid-template-columns:64px 1fr}
  .wcd-em-hero-content .wcd-em-title{font-size:clamp(1.4rem,5vw,2rem)}
  .wcd-em-archive .wcd-em-archive-head{flex-direction:column;align-items:flex-start}
  .wcd-em-view-toggle{margin-top:4px}
  .wcd-em-page{gap:18px}
  .wcd-em-actions .button{flex:1 1 auto;min-width:0}
}