/* ============================================================
   TEC Event Sidebar — tec-sidebar.css
   Dark teal theme. All values are CSS custom properties
   so you can override anything in your theme's style.css.
   ============================================================ */

/* ── Design tokens — override these in your theme ─────────── */
:root {
    --tec-sb-accent:          #14b8a6;
    --tec-sb-accent-dark:     #0d9488;
    --tec-sb-accent-glow:     rgba(20, 184, 166, 0.28);
    --tec-sb-accent-soft:     rgba(20, 184, 166, 0.12);
    --tec-sb-accent-border:   rgba(20, 184, 166, 0.30);

    --tec-sb-bg-0:            #0d1117;
    --tec-sb-bg-1:            #161b22;
    --tec-sb-bg-2:            #1c2333;
    --tec-sb-bg-3:            #242f42;

    --tec-sb-border-color:    rgba(255, 255, 255, 0.07);

    --tec-sb-text:            #e6edf3;
    --tec-sb-text-muted:      #8b949e;
    --tec-sb-text-faint:      #6e7681;

    --tec-sb-panel-width:     440px;
    --tec-sb-speed:           0.32s;
    --tec-sb-ease:            cubic-bezier(0.4, 0, 0.2, 1);

    --tec-sb-z-overlay:       99998;
    --tec-sb-z-panel:         99999;
    --tec-sb-z-dropdown:      100000;
}


/* ============================================================
   BUTTONS — injected into each event card via PHP hook
   ============================================================ */

.tec-sb-btn-row {
    display:    flex;
    align-items: center;
    gap:        10px;
    flex-wrap:  wrap;
    margin-top: 14px;
    /* reset any theme/TEC styles that might interfere */
    padding:    0 !important;
    background: none !important;
    border:     none !important;
    box-shadow: none !important;
}

.tec-sb-btn {
    display:         inline-flex;
    align-items:     center;
    gap:             7px;
    padding:         9px 18px;
    border-radius:   8px;
    font-size:       13px;
    font-weight:     600;
    line-height:     1;
    letter-spacing:  0.01em;
    cursor:          pointer;
    border:          1.5px solid transparent;
    text-decoration: none !important;
    white-space:     nowrap;
    font-family:     inherit !important;
    transition:
        background   0.18s var(--tec-sb-ease),
        color        0.18s var(--tec-sb-ease),
        border-color 0.18s var(--tec-sb-ease),
        transform    0.15s ease,
        box-shadow   0.15s ease;
}

.tec-sb-btn:focus-visible {
    outline:        2px solid var(--tec-sb-accent);
    outline-offset: 3px;
}

/* Ghost button — "Add to Calendar" */
.tec-sb-btn--cal {
    background:   transparent;
    color:        var(--tec-sb-text) !important;
    border-color: rgba(255, 255, 255, 0.18);
}
.tec-sb-btn--cal:hover {
    background:   var(--tec-sb-accent-soft);
    border-color: var(--tec-sb-accent-border);
    color:        var(--tec-sb-accent) !important;
}

/* Filled teal — "View Details" */
.tec-sb-btn--view {
    background:   var(--tec-sb-accent);
    color:        #ffffff !important;
    border-color: transparent;
}
.tec-sb-btn--view:hover {
    background: var(--tec-sb-accent-dark);
    transform:  translateY(-1px);
    box-shadow: 0 4px 16px var(--tec-sb-accent-glow);
}


/* ============================================================
   CALENDAR DROPDOWN
   ============================================================ */

.tec-sb-cal-dropdown {
    position:      fixed; /* JS sets top/left */
    z-index:       var(--tec-sb-z-dropdown);
    background:    var(--tec-sb-bg-1);
    border:        1.5px solid var(--tec-sb-border-color);
    border-radius: 10px;
    padding:       5px;
    min-width:     215px;
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.04);
    animation: tec-sb-pop 0.15s var(--tec-sb-ease) both;
}

@keyframes tec-sb-pop {
    from { opacity: 0; transform: translateY(-6px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}

.tec-sb-cal-option {
    display:         flex;
    align-items:     center;
    gap:             10px;
    padding:         10px 14px;
    border-radius:   7px;
    font-size:       13px;
    font-weight:     600;
    color:           var(--tec-sb-text) !important;
    text-decoration: none !important;
    transition:      background 0.12s ease, color 0.12s ease;
    cursor:          pointer;
}
.tec-sb-cal-option:hover {
    background: var(--tec-sb-bg-3);
    color:      var(--tec-sb-accent) !important;
}


/* ============================================================
   OVERLAY (backdrop behind the panel)
   ============================================================ */

.tec-sb-overlay {
    position:        fixed;
    inset:           0;
    background:      rgba(0, 0, 0, 0.70);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index:         var(--tec-sb-z-overlay);
    opacity:         0;
    pointer-events:  none;
    transition:      opacity var(--tec-sb-speed) var(--tec-sb-ease);
}

.tec-sb-overlay.is-open {
    opacity:        1;
    pointer-events: auto;
}


/* ============================================================
   SIDEBAR PANEL
   ============================================================ */

.tec-sb-panel {
    position:        fixed;
    top:             0;
    right:           0;
    height:          100%;
    width:           var(--tec-sb-panel-width);
    max-width:       100vw;
    z-index:         var(--tec-sb-z-panel);
    background:      var(--tec-sb-bg-1);
    border-left:     1px solid var(--tec-sb-border-color);
    overflow-y:      auto;
    overflow-x:      hidden;
    transform:       translateX(100%);
    transition:      transform var(--tec-sb-speed) var(--tec-sb-ease);
    /* Thin scrollbar */
    scrollbar-width: thin;
    scrollbar-color: var(--tec-sb-bg-3) transparent;
}

.tec-sb-panel::-webkit-scrollbar       { width: 4px; }
.tec-sb-panel::-webkit-scrollbar-track { background: transparent; }
.tec-sb-panel::-webkit-scrollbar-thumb { background: var(--tec-sb-bg-3); border-radius: 99px; }

.tec-sb-panel.is-open {
    transform:  translateX(0);
    box-shadow: -12px 0 48px rgba(0, 0, 0, 0.55);
}

/* Lock body scroll when panel is open */
body.tec-sb-locked {
    overflow: hidden;
}

/* Close × button */
.tec-sb-close {
    position:        absolute;
    top:             14px;
    right:           14px;
    z-index:         2;
    width:           34px;
    height:          34px;
    display:         flex;
    align-items:     center;
    justify-content: center;
    border-radius:   50%;
    background:      var(--tec-sb-bg-2);
    border:          1.5px solid var(--tec-sb-border-color);
    color:           var(--tec-sb-text-muted);
    cursor:          pointer;
    padding:         0;
    transition:      background 0.2s, color 0.2s, border-color 0.2s;
}
.tec-sb-close:hover {
    background:   var(--tec-sb-accent);
    color:        #fff;
    border-color: transparent;
}
.tec-sb-close:focus-visible {
    outline:        2px solid var(--tec-sb-accent);
    outline-offset: 3px;
}

/* Content wrapper */
.tec-sb-content {
    min-height: 100%;
}


/* ============================================================
   LOADING + ERROR STATES
   ============================================================ */

.tec-sb-loading,
.tec-sb-error {
    display:         flex;
    flex-direction:  column;
    align-items:     center;
    justify-content: center;
    min-height:      320px;
    gap:             16px;
    padding:         40px 28px;
    text-align:      center;
    color:           var(--tec-sb-text-muted);
    font-size:       14px;
}

.tec-sb-error a {
    color: var(--tec-sb-accent);
    text-decoration: underline;
}

.tec-sb-spinner {
    width:        40px;
    height:       40px;
    border:       3px solid var(--tec-sb-border-color);
    border-top-color: var(--tec-sb-accent);
    border-radius: 50%;
    animation:    tec-sb-spin 0.75s linear infinite;
}

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


/* ============================================================
   SIDEBAR CONTENT — rendered by PHP AJAX handler
   ============================================================ */

/* Hero image */
.tec-sb-hero {
    position: relative;
    width:    100%;
    height:   200px;
    overflow: hidden;
}
.tec-sb-hero img {
    width:      100%;
    height:     100%;
    object-fit: cover;
    display:    block;
}
.tec-sb-hero-fade {
    position:   absolute;
    inset:      0;
    background: linear-gradient(to bottom, transparent 40%, var(--tec-sb-bg-1) 100%);
}

/* Body padding */
.tec-sb-body {
    padding: 22px 26px 48px;
}

/* Event type badge */
.tec-sb-badge {
    display:        inline-block;
    padding:        4px 12px;
    border-radius:  999px;
    font-size:      11px;
    font-weight:    700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color:          var(--tec-sb-accent);
    background:     var(--tec-sb-accent-soft);
    border:         1px solid var(--tec-sb-accent-border);
    margin-bottom:  12px;
}

/* Title */
.tec-sb-title {
    font-size:   22px !important;
    font-weight: 700 !important;
    color:       var(--tec-sb-text) !important;
    line-height: 1.3 !important;
    margin:      0 0 8px !important;
    padding:     0 !important;
}

/* Organizer */
.tec-sb-organizer {
    font-size:   13.5px;
    color:       var(--tec-sb-text-muted);
    margin:      0 0 18px;
}
.tec-sb-organizer a {
    color:           var(--tec-sb-text-muted);
    text-decoration: none;
    border-bottom:   1px solid transparent;
    transition:      color 0.15s, border-color 0.15s;
}
.tec-sb-organizer a:hover {
    color:        var(--tec-sb-accent);
    border-color: var(--tec-sb-accent);
}

/* Divider */
.tec-sb-divider {
    border:     none;
    height:     1px;
    background: var(--tec-sb-border-color);
    margin:     0 0 20px;
}

/* Info grid */
.tec-sb-info-grid {
    display:        flex;
    flex-direction: column;
    gap:            15px;
    margin-bottom:  22px;
}

.tec-sb-info-row {
    display:     flex;
    align-items: flex-start;
    gap:         13px;
}

.tec-sb-info-icon {
    width:       20px;
    height:      20px;
    flex-shrink: 0;
    margin-top:  1px;
    color:       var(--tec-sb-accent);
}
.tec-sb-info-icon svg {
    width:  100%;
    height: 100%;
}

.tec-sb-info-row > div {
    display:        flex;
    flex-direction: column;
    gap:            3px;
}

.tec-sb-info-label {
    display:        block;
    font-size:      10.5px;
    font-weight:    700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color:          var(--tec-sb-text-faint);
}

.tec-sb-info-value {
    display:     block;
    font-size:   14px;
    font-weight: 500;
    color:       var(--tec-sb-text);
}
.tec-sb-info-value a {
    color:           var(--tec-sb-text);
    text-decoration: none;
    border-bottom:   1px dotted var(--tec-sb-text-muted);
    transition:      color 0.15s;
}
.tec-sb-info-value a:hover {
    color: var(--tec-sb-accent);
}

/* Generic section block */
.tec-sb-section {
  margin-bottom: 8px !important;
  margin-top: 8px !important;
}
}

.tec-sb-section-title {
    font-size:      11px !important;
    font-weight:    700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    color:          var(--tec-sb-text-faint) !important;
    margin:         0 0 10px !important;
    padding:        0 !important;
}

/* Pills */
.tec-sb-pills {
    display:   flex;
    flex-wrap: wrap;
    gap:       7px;
}

.tec-sb-pill {
    display:     inline-block;
    padding:     2px 12px !important;
    border-radius: 999px;
    font-size:   12px;
    font-weight: 600;
}

.tec-sb-pill--cat {
   background: #4A6FD4;
    color: #fff;
    border:     1px solid rgba(20, 184, 166, 0.25);
	font-size: 12px;
	 font-weight: 600;
	 display:     inline-block;
	cursor:default;
}

.tec-sb-pill--tag {
	border: 1px solid #4A6FD4 !important;
	color: #4A6FD4;
	background: transparent;
	border-radius: 9999px;
	font-size: 10px;
	font-weight: 500;
	letter-spacing: -0.04px;
	padding: 5px 12px !important;
	cursor: default;
	transition: all 0.3s ease;
	line-height: 1.2;
	text-transform: uppercase;
	margin-right: 4px;
	margin-bottom: 4px;
}

/* Description */
.tec-sb-description {
    font-size:   14px;
    line-height: 1.75;
    color:       var(--tec-sb-text-muted);
    margin:      0;
}

/* CTA button group */
.tec-sb-ctas {
    display:        flex;
    flex-direction: column;
    gap:            10px;
    margin-top:     26px;
    padding-top:    22px;
    border-top:     1px solid var(--tec-sb-border-color);
}

.tec-sb-cta {
    display:         flex;
    align-items:     center;
    justify-content: center;
    gap:             9px;
    padding:         13px 20px;
    border-radius:   10px;
    font-size:       14px;
    font-weight:     600;
    text-decoration: none !important;
    letter-spacing:  0.01em;
    cursor:          pointer;
    border:          1.5px solid transparent;
    font-family:     inherit !important;
    transition:
        background   0.2s ease,
        color        0.2s ease,
        border-color 0.2s ease,
        transform    0.15s ease,
        box-shadow   0.15s ease;
}
.tec-sb-cta:focus-visible {
    outline:        2px solid var(--tec-sb-accent);
    outline-offset: 3px;
}

.tec-sb-cta--primary {
    background: var(--tec-sb-accent);
    color:      #ffffff !important;
}
.tec-sb-cta--primary:hover {
    background: var(--tec-sb-accent-dark);
    transform:  translateY(-1px);
    box-shadow: 0 5px 20px var(--tec-sb-accent-glow);
}

.tec-sb-cta--secondary {
    background:   var(--tec-sb-bg-2);
    color:        var(--tec-sb-text) !important;
    border-color: var(--tec-sb-border-color);
}
.tec-sb-cta--secondary:hover {
    background:   var(--tec-sb-bg-3);
    border-color: var(--tec-sb-accent-border);
    color:        var(--tec-sb-accent) !important;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 520px) {
    :root {
        --tec-sb-panel-width: 100vw;
    }
    .tec-sb-body {
        padding: 18px 18px 40px;
    }
    .tec-sb-btn-row {
        flex-direction: column;
        align-items:    flex-start;
    }
    .tec-sb-btn {
        width: 100%;
        justify-content: center;
    }
}


/* ============================================================
   ACCESSIBILITY — respect reduced motion
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    .tec-sb-panel,
    .tec-sb-overlay,
    .tec-sb-cal-dropdown,
    .tec-sb-spinner,
    .tec-sb-btn,
    .tec-sb-cta {
        transition: none !important;
        animation:  none !important;
    }
}
