/**
 * EL Core — Base Component Styles
 * 
 * All colors reference CSS custom properties (--el-primary, etc.)
 * which are injected by the Asset Loader from brand settings.
 * This means these styles automatically match any client's branding.
 */

/* ═══════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════ */

.el-component {
    font-family: var(--el-font-body, 'Inter', sans-serif);
    line-height: 1.6;
    color: #333;
}

.el-component * {
    box-sizing: border-box;
}

/* ═══════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════ */

.el-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--el-font-body, 'Inter', sans-serif);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    text-decoration: none;
}

.el-btn-primary {
    background: var(--el-primary, #1a1a2e);
    color: #fff;
    border-color: var(--el-primary, #1a1a2e);
}

.el-btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.el-btn-accent {
    background: var(--el-accent, #e94560);
    color: #fff;
    border-color: var(--el-accent, #e94560);
}

.el-btn-outline {
    background: transparent;
    color: var(--el-primary, #1a1a2e);
    border-color: var(--el-primary, #1a1a2e);
}

.el-btn-outline:hover {
    background: var(--el-primary, #1a1a2e);
    color: #fff;
}

.el-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ═══════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════ */

.el-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
}

.el-error {
    color: #e94560;
    padding: 10px;
    font-size: 14px;
}

/* ═══════════════════════════════════════════
   EVENT LIST — CARDS LAYOUT
   ═══════════════════════════════════════════ */

.el-event-list.el-layout-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.el-event-card {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    transition: box-shadow 0.2s ease;
}

.el-event-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.el-event-date-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    height: 60px;
    background: var(--el-primary, #1a1a2e);
    color: #fff;
    border-radius: 8px;
    flex-shrink: 0;
}

.el-event-month {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.el-event-day {
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
}

.el-event-details {
    flex: 1;
    min-width: 0;
}

.el-event-title {
    font-family: var(--el-font-heading, 'Inter', sans-serif);
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: var(--el-primary, #1a1a2e);
}

.el-event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.el-event-excerpt {
    font-size: 14px;
    color: #555;
    margin: 0;
}

/* ═══════════════════════════════════════════
   EVENT LIST — LIST LAYOUT
   ═══════════════════════════════════════════ */

.el-event-list.el-layout-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.el-layout-list .el-event-card {
    padding: 16px;
}

/* ═══════════════════════════════════════════
   RSVP COMPONENT
   ═══════════════════════════════════════════ */

.el-event-rsvp {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.el-rsvp-status {
    font-size: 14px;
    color: #28a745;
}

/* ═══════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════ */

.el-form {
    max-width: 520px;
}

.el-field {
    margin-bottom: 20px;
}

.el-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
}

.el-required {
    color: var(--el-accent, #e94560);
}

.el-input,
.el-select,
.el-textarea {
    display: block;
    width: 100%;
    padding: 10px 14px;
    font-size: 15px;
    font-family: var(--el-font-body, 'Inter', sans-serif);
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    background: #fff;
    color: #333;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.el-input:focus,
.el-select:focus,
.el-textarea:focus {
    outline: none;
    border-color: var(--el-primary, #1a1a2e);
    box-shadow: 0 0 0 3px rgba(26, 26, 46, 0.08);
}

.el-field-hint {
    display: block;
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

.el-field-static {
    font-size: 15px;
    color: #555;
    margin: 0;
    padding: 10px 0 0 0;
}

.el-field-submit {
    margin-top: 28px;
}

.el-form-footer {
    margin-top: 20px;
    font-size: 14px;
    color: #666;
}

.el-form-footer a {
    color: var(--el-primary, #1a1a2e);
    font-weight: 600;
    text-decoration: none;
}

.el-form-footer a:hover {
    text-decoration: underline;
}

/* ═══════════════════════════════════════════
   NOTICES & MESSAGES
   ═══════════════════════════════════════════ */

.el-messages:empty {
    display: none;
}

.el-notice {
    padding: 14px 18px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.el-notice p {
    margin: 0;
}

.el-notice-info {
    background: #eef6ff;
    border-color: #3b82f6;
    color: #1e40af;
}

.el-notice-success {
    background: #ecfdf5;
    border-color: #22c55e;
    color: #166534;
}

.el-notice-warning {
    background: #fffbeb;
    border-color: #f59e0b;
    color: #92400e;
}

.el-notice-error {
    background: #fef2f2;
    border-color: #ef4444;
    color: #991b1b;
}

/* ═══════════════════════════════════════════
   REGISTRATION FORM
   ═══════════════════════════════════════════ */

/* Honeypot field — hidden from humans, visible to bots */
.el-hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    overflow: hidden;
}

/* Name fields side by side */
.el-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Invite code toggle link */
.el-invite-toggle {
    background: none;
    border: none;
    color: var(--el-primary, #1a1a2e);
    font-size: 13px;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    font-family: var(--el-font-body, 'Inter', sans-serif);
}

.el-invite-toggle:hover {
    opacity: 0.8;
}

/* Registration mode notice */
.el-register-notice {
    margin-bottom: 24px;
}

/* Form status message (inline AJAX feedback) */
.el-form-status {
    display: none;
    margin-bottom: 16px;
}

/* ═══════════════════════════════════════════
   USER PROFILE
   ═══════════════════════════════════════════ */

.el-profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e8e8e8;
}

.el-profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.el-profile-name {
    font-family: var(--el-font-heading, 'Inter', sans-serif);
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: var(--el-primary, #1a1a2e);
}

.el-profile-email {
    font-size: 14px;
    color: #666;
    margin: 0 0 6px 0;
}

.el-role-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
    background: var(--el-primary, #1a1a2e);
    color: #fff;
}

/* Profile status banners */
.el-profile-banner {
    margin-bottom: 20px;
}

/* Read-only profile fields */
.el-profile-fields {
    margin-top: 8px;
}

.el-profile-fields dt {
    font-size: 13px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
    margin-top: 16px;
}

.el-profile-fields dt:first-child {
    margin-top: 0;
}

.el-profile-fields dd {
    font-size: 15px;
    color: #333;
    margin: 0;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */

@media (max-width: 600px) {
    .el-event-list.el-layout-cards {
        grid-template-columns: 1fr;
    }

    .el-event-card {
        flex-direction: column;
    }

    .el-event-date-badge {
        flex-direction: row;
        gap: 8px;
        width: fit-content;
        height: auto;
        padding: 6px 12px;
    }

    .el-field-row {
        grid-template-columns: 1fr;
    }

    .el-profile-header {
        flex-direction: column;
        text-align: center;
    }
}
