/* ============================================
   FHDC Events Portal - Frontend Styles
   Black, White & Grey Theme
   ============================================ */

body { background: #f5f5f5 !important; }

/* ---- Reset & Base ---- */
.fhdc-events-portal *,
.fhdc-booking-wrap *,
.fhdc-free-booking *,
.fhdc-success-wrap * {
    box-sizing: border-box;
}

/* ---- Events Portal Grid ---- */
.fhdc-events-portal {
    padding: 20px 0;
}

.fhdc-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
}

.fhdc-no-events {
    text-align: center;
    color: #666;
    padding: 40px;
}

/* ---- Event Card ---- */
.fhdc-event-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fhdc-event-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.fhdc-card-image-wrap {
    position: relative;
    display: block;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.fhdc-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.fhdc-event-card:hover .fhdc-card-image {
    transform: scale(1.03);
}

.fhdc-card-badge-overlay {
    position: absolute;
    top: 12px;
    right: 12px;
}

/* ---- Badges ---- */
.fhdc-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.fhdc-badge-sold-out {
    background: #111;
    color: #fff;
}

.fhdc-badge-coming-soon {
    background: #555;
    color: #fff;
}

.fhdc-badge-closed {
    background: #888;
    color: #fff;
}

/* ---- Card Body ---- */
.fhdc-card-body {
    padding: 20px 22px 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.fhdc-card-category {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    font-weight: 700;
    margin-bottom: 8px;
}

.fhdc-card-title {
    margin: 0 0 12px;
    font-size: 18px;
    line-height: 1.3;
}

.fhdc-card-title a {
    color: #111;
    text-decoration: none;
}

.fhdc-card-title a:hover {
    text-decoration: underline;
}

.fhdc-card-meta {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 18px;
    flex: 1;
}

.fhdc-meta-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: #555;
}

.fhdc-meta-item svg {
    flex-shrink: 0;
    stroke: #888;
}

.fhdc-card-btn {
    display: inline-block;
    background: #111;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    transition: background 0.2s;
}

.fhdc-card-btn:hover {
    background: #333;
    color: #fff;
    text-decoration: none;
}

/* ============================================
   BOOKING FORM
   ============================================ */

.fhdc-booking-wrap {
    max-width: 820px;
    margin: 0 auto;
    padding: 10px 0;
}

.fhdc-booking-form-container {
    font-size: 15px;
    color: #222;
}

/* --- FIXED: Darker dividers between form sections --- */
/* Form sections – reduced top spacing */
.fhdc-ep-booking-body .fhdc-form-section {
    margin-top: 16px !important;
    padding-top: 16px !important;
    border-top: 1px solid #ccc !important;
}

.fhdc-ep-booking-body .fhdc-form-section:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
    border-top: none !important;
}

/* Section title – more space below text and below border */
.fhdc-section-title {
    margin-top: 0px !important;
    margin-bottom: 12px !important;
    padding-bottom: 6px !important;
    border-bottom: 1px solid #ccc !important;
}

/* Description – more space before attendee blocks */
.fhdc-section-desc {
    margin-bottom: 16px !important;
}

.fhdc-form-section {
    margin-bottom: 30px !important;
}

/* ---- Form Grid ---- */
.fhdc-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.fhdc-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.fhdc-field label {
    font-size: 13px;
    font-weight: 600;
    color: #444;
}

.fhdc-field input,
.fhdc-field select,
.fhdc-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
    color: #222;
    background: #fafafa;
    transition: border-color 0.2s;
    appearance: auto;
}

.fhdc-field input:focus,
.fhdc-field select:focus,
.fhdc-field textarea:focus {
    outline: none;
    border-color: #111;
    background: #fff;
}

.fhdc-field-full {
    grid-column: 1 / -1;
}

.req {
    color: #c0392b;
}

/* ---- Attendee Blocks ---- */
/* Attendee block – darker background */
.fhdc-attendee-block {
    background: #f0f0f0 !important;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
}

.fhdc-attendee-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.fhdc-att-label {
    font-weight: 700;
    font-size: 14px;
    color: #111;
}

.fhdc-remove-att,
.fhdc-remove-guest {
    background: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    color: #666;
    transition: 0.2s;
}

.fhdc-remove-att:hover,
.fhdc-remove-guest:hover {
    border-color: #c0392b;
    color: #c0392b;
}

/* ---- Day Visitor ---- */
.fhdc-day-visitor-section {
    margin-top: 16px;
    padding: 16px;
    background: #fff;
    border: 1px dashed #bbb;
    border-radius: 6px;
}

.fhdc-dv-note {
    font-size: 12px;
    color: #666;
    margin-bottom: 12px;
}

.fhdc-day-block {
    margin-bottom: 10px;
}

.fhdc-day-rate {
    font-size: 12px;
    color: #888;
}

.fhdc-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    line-height: 1.4;
    margin-bottom: 4px;
}

.fhdc-checkbox-label input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    width: auto;
    accent-color: #111;
}

/* ---- Price per Attendee ---- */
.fhdc-att-price-line {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    font-size: 13px;
    color: #333;
}

.fhdc-att-price-label strong {
    color: #111;
}

/* ---- Price Summary ---- */
.fhdc-price-summary {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 22px 24px;
    margin-bottom: 22px;
}

.fhdc-price-summary h3 {
    margin: 0 0 14px;
    font-size: 16px;
}

.fhdc-breakdown-line {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    padding: 5px 0;
    border-bottom: 1px solid #e5e5e5;
    color: #444;
}

.fhdc-price-total {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 700;
    margin-top: 12px;
    color: #111;
}

/* Indemnity box – more space above and below */
.fhdc-indemnity-text {
    margin-top: 12px !important;
    margin-bottom: 20px !important;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 16px;
    font-size: 13px;
    color: #444;
    max-height: 200px;
    overflow-y: auto;
    line-height: 1.6;
}

/* ---- Notices ---- */
.fhdc-notice,
.fhdc-form-message {
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.fhdc-notice-error,
.fhdc-form-message.fhdc-notice-error {
    background: #fdf2f0;
    border: 1px solid #e74c3c;
    color: #721c24;
}

.fhdc-notice-success,
.fhdc-form-message.fhdc-notice-success {
    background: #edf7ed;
    border: 1px solid #27ae60;
    color: #155724;
}

.fhdc-notice-info,
.fhdc-form-message.fhdc-notice-info {
    background: #eff5ff;
    border: 1px solid #3498db;
    color: #1a4a7a;
}

/* ---- Buttons ---- */
.fhdc-btn {
    display: inline-block;
    background: #111;
    color: #fff;
    padding: 13px 30px;
    border-radius: 5px;
    font-size: 15px;
    font-weight: 600;
    border: 2px solid #111;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    font-family: inherit;
}

.fhdc-btn:hover {
    background: #333;
    border-color: #333;
    color: #fff;
}

.fhdc-btn:disabled {
    background: #888;
    border-color: #888;
    cursor: not-allowed;
}

.fhdc-btn-outline {
    display: inline-block;
    background: transparent;
    color: #111;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid #111;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    font-family: inherit;
    margin-top: 4px;
}

.fhdc-btn-outline:hover {
    background: #111;
    color: #fff;
}

.fhdc-form-actions {
    margin-top: 10px;
}

/* ---- Success Screen ---- */
.fhdc-success-wrap {
    text-align: center;
    padding: 50px 30px;
    max-width: 600px;
    margin: 0 auto;
}

.fhdc-success-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #111;
    color: #fff;
    font-size: 34px;
    line-height: 70px;
    margin: 0 auto 20px;
}

.fhdc-success-wrap h2 {
    font-size: 26px;
    margin-bottom: 12px;
}

.fhdc-booking-ref-display {
    display: inline-block;
    background: #111;
    color: #fff;
    padding: 10px 24px;
    border-radius: 5px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 3px;
    font-family: monospace;
    margin: 16px 0;
}

.fhdc-success-details {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 18px 24px;
    margin: 20px 0;
    text-align: left;
}

.fhdc-success-detail {
    padding: 6px 0;
    font-size: 14px;
    border-bottom: 1px solid #e8e8e8;
    color: #333;
}

.fhdc-success-detail:last-child {
    border-bottom: none;
}

/* ---------- Success Modal ---------- */
#fhdc-success-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.fhdc-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(3px);
}

.fhdc-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.fhdc-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #888;
    transition: color 0.2s;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.fhdc-modal-close:hover {
    color: #111;
    background: #f0f0f0;
}

.fhdc-modal-content .fhdc-success-wrap {
    padding: 20px 0 0;
    background: transparent;
    box-shadow: none;
}

.fhdc-modal-content .fhdc-success-wrap h2 {
    font-size: 28px;
    margin-top: 0;
}

.fhdc-modal-content .fhdc-btn {
    display: inline-block;
    margin: 0 5px;
}

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

@media (max-width: 700px) {
    .fhdc-events-grid {
        grid-template-columns: 1fr;
    }

    .fhdc-form-grid {
        grid-template-columns: 1fr;
    }

    .fhdc-form-section {
        padding: 20px 16px 16px;
    }

    .fhdc-price-total {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .fhdc-form-section {
        padding: 16px 12px;
    }

    .fhdc-attendee-block {
        padding: 14px 12px;
    }
}



/* ============================================
   SINGLE EVENT PAGE — CARD GRID LAYOUT
   ============================================ */

.fhdc-ep {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 20px 60px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-sizing: border-box;
}

/* ── Hero Card ── */
.fhdc-ep-hero-card {
    background: #111;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.15);
}

.fhdc-ep-hero-image {
    width: 100%;
    max-height: 480px;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: center;
}

.fhdc-ep-hero-body {
    background: #111;
    color: #fff;
    padding: 28px 36px 32px;
}

.fhdc-ep-cat-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #999;
    margin-bottom: 8px;
}

.fhdc-ep-event-title {
    font-size: 30px !important;
    font-weight: 800 !important;
    color: #fff !important;
    margin: 0 0 8px !important;
    line-height: 1.2 !important;
    padding: 0 !important;
    border: none !important;
}

.fhdc-ep-tagline {
    font-size: 16px !important;
    color: #ccc !important;
    margin: 0 0 14px !important;
    font-style: italic;
    line-height: 1.5 !important;
}

/* Content from the WP editor (post content / excerpt) */
.fhdc-ep-excerpt {
    font-size: 15px;
    color: #ccc;
    line-height: 1.7;
    margin-bottom: 18px;
    max-width: 760px;
}

.fhdc-ep-excerpt p {
    margin: 0 0 10px !important;
    color: #ccc !important;
    line-height: 1.7 !important;
}

.fhdc-ep-excerpt p:last-child { margin-bottom: 0 !important; }

.fhdc-ep-excerpt strong, .fhdc-ep-excerpt b { color: #fff; }

.fhdc-ep-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.fhdc-ep-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    padding: 5px 13px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
}

.fhdc-ep-meta-pill svg { flex-shrink: 0; stroke: #bbb; }

.fhdc-ep-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #fff;
    line-height: 1;
}

/* ── 2-Column Row — cards top-aligned ── */
.fhdc-ep-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
    align-items: stretch;
}

/* ── Card shell ── */
.fhdc-ep-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    height: 100%;
}

.fhdc-ep-card-header {
    background: #111;
    color: #fff;
    padding: 13px 20px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 9px;
    line-height: 1;
}

.fhdc-ep-card-header svg { flex-shrink: 0; stroke: #999; }

.fhdc-ep-card-body {
    padding: 20px 22px;
}

.fhdc-ep > .fhdc-ep-card {
    height: auto !important;
}

/* ── Event Details card rows ── */
.fhdc-ep-detail-row {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 6px 12px;
    padding: 9px 0;
    border-bottom: 1px solid #f0f0f0;
    align-items: baseline;
}

.fhdc-ep-detail-row:last-child { border-bottom: none; padding-bottom: 0; }
.fhdc-ep-detail-row:first-child { padding-top: 0; }

.fhdc-ep-detail-label {
    font-weight: 700;
    color: #999;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.4;
    padding-top: 1px;
}

.fhdc-ep-detail-value {
    color: #222;
    font-size: 14px;
    line-height: 1.5;
}

/* ── Programme / schedule text ── */
.fhdc-ep-schedule {
    font-size: 14px;
    line-height: 1.4;
    color: #333;
    margin: 0;
    word-break: break-word;
}
.fhdc-ep-schedule p,
.fhdc-ep-schedule br + br {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.4 !important;
}
.fhdc-ep-schedule p + p {
    margin-top: 4px !important;
}

/* ── General card text (accommodation, what to bring, etc.) ── */
.fhdc-ep-text {
    font-size: 14px;
    line-height: 1.4;
    color: #333;
    margin: 0;
    word-break: break-word;
}
.fhdc-ep-text p {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.4 !important;
}
.fhdc-ep-text p + p {
    margin-top: 4px !important;
}

/* ── Address / Getting There card ── */
.fhdc-ep-address-block {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.fhdc-ep-address-block svg { flex-shrink: 0; margin-top: 2px; stroke: #555; }

.fhdc-ep-address-text {
    font-size: 14px;
    line-height: 1.65;
    color: #222;
    font-weight: 600;
    margin: 0;
    white-space: pre-line;
}

.fhdc-ep-map-embed iframe {
    border-radius: 8px;
    display: block;
    width: 100%;
    border: 0;
}

/* ── Link buttons inside cards ── */
.fhdc-ep-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #111;
    color: #fff !important;
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.2s;
    margin-top: 12px;
    line-height: 1;
}

.fhdc-ep-link-btn:hover { background: #333; color: #fff !important; }

/* ── Booking section ── */
.fhdc-ep-booking-section {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-top: 0;
}

.fhdc-ep-booking-header {
    background: #111;
    color: #fff;
    padding: 15px 24px;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 11px;
    line-height: 1;
}

.fhdc-ep-booking-header svg { stroke: #999; }

/* --- FIXED: Added subtle background to booking body for better contrast --- */
.fhdc-ep-booking-body {
    padding: 28px;
    background: #fafafa; /* light grey background */
}

.fhdc-ep-booking-body .fhdc-booking-wrap,
.fhdc-ep-booking-body .fhdc-booking-form-container,
.fhdc-ep-booking-body .fhdc-free-booking {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Ensure borders inside booking body stand out */
.fhdc-ep-booking-body .fhdc-price-summary {
    border: 1px solid #ddd !important;
}

.fhdc-ep-booking-body .fhdc-attendee-block {
    border: 1px solid #ddd !important;
}

/* ── Notices ── */
.fhdc-ep-notice {
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.6;
}

.fhdc-ep-notice-info  { background: #e8f4fd; color: #1a5f8a; border: 1px solid #bee3f8; }
.fhdc-ep-notice-warn  { background: #fef3cd; color: #856404; border: 1px solid #ffc107; }

/* Tighten heading-to-paragraph gap inside event cards */
.fhdc-ep-card-body h1,
.fhdc-ep-card-body h2,
.fhdc-ep-card-body h3,
.fhdc-ep-card-body h4 {
    margin-bottom: 4px !important;
    margin-top: 0 !important;
    line-height: 1.3 !important;
}

.fhdc-ep-booking-body h1,
.fhdc-ep-booking-body h2,
.fhdc-ep-booking-body h3,
.fhdc-ep-booking-body h4 {
    margin-bottom: 6px !important;
    margin-top: 16px !important;
}

/* ── Responsive ── */
@media (max-width: 860px) {
    .fhdc-ep-row-2col { grid-template-columns: 1fr; }
    .fhdc-ep-hero-body { padding: 20px 18px 24px; }
    .fhdc-ep-event-title { font-size: 22px !important; }
    .fhdc-ep-booking-body { padding: 20px 16px; }
    .fhdc-ep { padding: 14px 12px 40px; }
}

@media (max-width: 480px) {
    .fhdc-ep-hero-meta { flex-direction: column; gap: 6px; }
    .fhdc-ep-event-title { font-size: 20px !important; }
    .fhdc-ep-detail-row { grid-template-columns: 1fr; gap: 2px; }
    .fhdc-ep-detail-label { padding-bottom: 0; }
}