/*
 * MIMH Registration Platform — Public CSS
 * Conference-branded registration pages.
 * Colors injected via CSS custom properties from conference settings.
 *
 * @version 1.4.0
 */

/* ============================================================
   DEFAULT COLOR VARS (overridden per conference via inline style)
   ============================================================ */
:root {
    --primary:         #C8102E;
    --secondary:       #1a1a1a;
    --accent:          #FFFFFF;
    --text-on-primary: #FFFFFF;
    --bg:              #f0f2f5;
    --white:           #ffffff;
    --border:          #e5e7eb;
    --text:            #1a1a1a;
    --text-muted:      #888888;
    --success:         #22c55e;
    --error:           #ef4444;
    --font:            Arial, 'Helvetica Neue', sans-serif;
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { font-family: var(--font); font-size: 15px; color: var(--text); background: var(--bg); line-height: 1.6; }
a { color: var(--primary); }
img { max-width: 100%; display: block; }

/* ============================================================
   LAYOUT
   ============================================================ */
.public-layout { display: flex; flex-direction: column; min-height: 100vh; }

/* ============================================================
   CONFERENCE HEADER
   ============================================================ */
.conf-header {
    background: var(--primary);
    color: var(--text-on-primary);
    padding: 24px 0;
}
.conf-header-inner {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 20px;
}
.conf-logo      { max-height: 70px; max-width: 200px; object-fit: contain; }
.conf-title     { font-size: 24px; font-weight: bold; margin-bottom: 4px; }
.conf-dates     { font-size: 14px; opacity: 0.85; }

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.reg-main       { flex: 1; padding: 32px 0; }
.reg-container  { max-width: 820px; margin: 0 auto; padding: 0 24px; }
.reg-heading    { font-size: 22px; font-weight: bold; margin-bottom: 24px; }

/* ============================================================
   REGISTRATION CARDS
   ============================================================ */
.reg-card {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    padding: 24px;
    margin-bottom: 20px;
}
.reg-card-title    { font-size: 17px; font-weight: bold; margin-bottom: 4px; }
.reg-card-subtitle { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }

/* ============================================================
   REGISTRATION TYPE TOGGLE
   ============================================================ */
.reg-type-toggle    { display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.reg-type-option {
    flex: 1;
    min-width: 160px;
    border: 3px solid #cccccc;
    border-radius: 8px;
    padding: 18px 20px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #eeeeee;
    position: relative;
}
.reg-type-option input[type="radio"] {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    accent-color: #C8102E;
}
.reg-type-label {
    flex: 1;
    font-weight: bold;
    font-size: 17px;
    color: #999999;
}
.reg-type-price {
    font-size: 18px;
    font-weight: bold;
    color: #999999;
}
/* ⚠️ SELECTED STATE — driven by JS .selected class */
.reg-type-option.selected {
    border: 3px solid #C8102E;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(200,16,46,0.25);
}
.reg-type-option.selected .reg-type-label {
    color: #C8102E;
    font-size: 18px;
}
.reg-type-option.selected .reg-type-price {
    color: #C8102E;
    font-size: 20px;
}
.reg-type-option.selected::after {
    content: '✓ SELECTED';
    position: absolute;
    top: -13px;
    right: 14px;
    background: #C8102E;
    color: #ffffff;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.05em;
    padding: 3px 10px;
    border-radius: 10px;
}
.reg-type-option:hover:not(.selected) {
    border-color: #aaaaaa;
    background: #e0e0e0;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-grid          { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid-3        { grid-template-columns: 1fr 1fr 1fr; }
.form-group         { margin-bottom: 14px; }
.form-label         { display: block; font-size: 13px; font-weight: bold; color: #444; margin-bottom: 5px; }
.required           { color: var(--primary); }
.form-hint          { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 14px;
    font-family: var(--font);
    color: var(--text);
    background: var(--white);
    transition: border-color 0.15s;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(200,16,46,0.1);
}
textarea.form-control { resize: vertical; min-height: 80px; }

/* ============================================================
   ATTENDEE ROW (group registration)
   ============================================================ */
.attendee-row       { background: #fafafa; border: 1px solid var(--border); border-radius: 6px; padding: 16px; margin-bottom: 12px; }
.attendee-header    { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }

/* ============================================================
   PRICING SUMMARY
   ============================================================ */
.pricing-row        { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.pricing-total      { display: flex; justify-content: space-between; padding: 12px 0; font-size: 18px; font-weight: bold; color: var(--primary); }
.discount-row       { display: flex; align-items: center; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.text-green         { color: var(--success); }

/* ============================================================
   SUBMIT SECTION
   ============================================================ */
.reg-submit         { text-align: center; margin: 24px 0; }
.btn-register {
    display: inline-block;
    background: var(--primary);
    color: var(--text-on-primary);
    padding: 16px 48px;
    border-radius: 4px;
    font-size: 17px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s;
    width: 100%;
    max-width: 400px;
}
.btn-register:hover { opacity: 0.9; }
.reg-submit-note    { font-size: 13px; color: var(--text-muted); margin-top: 10px; }

/* ============================================================
   ALERTS
   ============================================================ */
.alert              { padding: 12px 16px; border-radius: 4px; margin-bottom: 16px; font-size: 14px; }
.alert-error        { background: #fee2e2; color: #7f1d1d; border: 1px solid #fca5a5; }
.alert-success      { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.alert-info         { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 9px 18px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    transition: background 0.15s;
}
.btn-primary    { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-secondary  { background: #fff; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--bg); }
.btn-danger     { background: var(--error); color: #fff; }
.btn-sm         { padding: 5px 10px; font-size: 13px; }

/* ============================================================
   PAYMENT SUMMARY PAGE
   ============================================================ */
.summary-table      { width: 100%; border-collapse: collapse; }
.summary-table td   { padding: 10px 0; border-bottom: 1px solid var(--border); }
.summary-table .label { color: var(--text-muted); font-size: 13px; width: 40%; }
.summary-total      { font-size: 22px; font-weight: bold; color: var(--primary); }
.touchnet-btn {
    display: block;
    background: var(--primary);
    color: var(--text-on-primary);
    padding: 18px;
    border-radius: 6px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    margin: 24px 0 8px;
    transition: opacity 0.15s;
}
.touchnet-btn:hover { opacity: 0.9; text-decoration: none; }

/* ============================================================
   CONFIRMATION PAGE
   ============================================================ */
.confirm-icon       { font-size: 56px; text-align: center; margin-bottom: 16px; }
.confirm-title      { font-size: 26px; font-weight: bold; text-align: center; margin-bottom: 8px; }
.confirm-subtitle   { color: var(--text-muted); text-align: center; margin-bottom: 32px; }
.confirm-ref        { font-size: 20px; font-weight: bold; color: var(--primary); text-align: center;
                      background: var(--bg); padding: 12px; border-radius: 6px; margin-bottom: 24px; }

/* ============================================================
   FOOTER
   ============================================================ */
.reg-footer {
    background: var(--secondary);
    color: rgba(255,255,255,0.6);
    text-align: center;
    padding: 20px;
    font-size: 13px;
    margin-top: auto;
}
.reg-footer a { color: rgba(255,255,255,0.8); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
    .form-grid      { grid-template-columns: 1fr; }
    .form-grid-3    { grid-template-columns: 1fr; }
    .conf-header-inner { flex-direction: column; text-align: center; }
    .conf-logo      { margin: 0 auto; }
    .reg-type-toggle { flex-direction: column; }
}
