/* ================================================================
   EA Community Suite — Frontend Styles  v0.5.0
   Theme: dark industrial · EA Network brand palette
================================================================ */

/* ─── Base ────────────────────────────────────────────────────── */
.ea-community-wrap {
    max-width: 940px;
    margin: 24px auto;
    padding: 0 16px;
    font-family: 'Outfit', 'Segoe UI', system-ui, sans-serif;
}
.ea-community-success {
    background: #e6ffed;
    border: 1px solid #b7f5c5;
    color: #0f5132;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 14px;
    font-weight: 600;
    font-size: 14px;
}
.ea-community-card {
    background: #0b1220;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 18px;
    padding: 24px 22px 22px;
    color: #e5e7eb;
    box-shadow: 0 12px 40px rgba(0,0,0,.40);
}
.ea-community-title {
    margin: 6px 0 14px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    color: #f1f5f9;
}
.ea-community-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}
.ea-community-logo  { max-height: 44px; width: auto; display: block; }
.ea-community-note  { opacity: .85; font-size: 14px; }

/* ─── Form elements ───────────────────────────────────────────── */
.ea-community-form  { margin-top: 10px; }
.ea-field           { margin: 10px 0; }
.ea-field label     { display: block; font-weight: 700; margin-bottom: 6px; font-size: 13px; letter-spacing: .2px; }
.ea-field input,
.ea-field textarea,
.ea-field select    {
    width: 100%;
    box-sizing: border-box;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.12);
    background: #050914;
    color: #e5e7eb;
    padding: 10px 13px;
    outline: none;
    font-family: inherit;
    font-size: 14px;
}
.ea-field input:focus,
.ea-field textarea:focus,
.ea-field select:focus {
    border-color: rgba(10,102,194,.7);
    box-shadow: 0 0 0 3px rgba(10,102,194,.18);
}
.ea-grid    { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ea-actions { margin-top: 14px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ea-req     { color: #fca5a5; }
.ea-help    { margin-top: 6px; font-size: 12px; opacity: .8; }

/* ─── Buttons ─────────────────────────────────────────────────── */
.ea-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #0a66c2, #0d4f9e);
    border: none;
    color: #fff;
    padding: 10px 18px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: filter .15s, transform .1s;
    font-family: inherit;
}
.ea-btn:hover   { filter: brightness(1.12); color: #fff; }
.ea-btn:active  { transform: scale(.97); }
.ea-btn-sm      { padding: 6px 12px; font-size: 12px; border-radius: 8px; }
.ea-btn-outline {
    background: transparent;
    border: 1px solid rgba(10,102,194,.5);
    color: #60a5fa;
    padding: 8px 14px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, border-color .15s;
    font-family: inherit;
}
.ea-btn-outline:hover  { background: rgba(10,102,194,.15); border-color: #0a66c2; color: #93c5fd; }
.ea-btn-bug            { border-color: rgba(124,58,237,.5); color: #c4b5fd; }
.ea-btn-bug:hover      { background: rgba(124,58,237,.15); border-color: #7c3aed; color: #ddd6fe; }

/* ─── Badges & Status ─────────────────────────────────────────── */
.ea-badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.6;
    white-space: nowrap;
}
.ea-badge-type-support  { background: #1e3a5f; color: #60a5fa; }
.ea-badge-type-bug      { background: #2e1065; color: #c4b5fd; }
.ea-badge-original      { background: rgba(96,165,250,.15); color: #93c5fd; }
.ea-badge-admin         { background: rgba(34,197,94,.15); color: #86efac; }

.ea-status {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}
.ea-status-open         { background: rgba(220,38,38,.15); color: #fca5a5;  border: 1px solid rgba(220,38,38,.3);  }
.ea-status-in-progress  { background: rgba(217,119,6,.15); color: #fcd34d;  border: 1px solid rgba(217,119,6,.3);  }
.ea-status-resolved     { background: rgba(22,163,74,.15); color: #86efac;  border: 1px solid rgba(22,163,74,.3);  }
.ea-status-closed       { background: rgba(107,114,128,.12); color: #9ca3af; border: 1px solid rgba(107,114,128,.25); }

.ea-priority-label      { font-size: 12px; opacity: .75; }
.ea-priority-urgent     { color: #fca5a5; }
.ea-priority-high       { color: #fcd34d; }
.ea-priority-normal     { color: #93c5fd; }
.ea-priority-low        { color: #9ca3af; }

/* ─── Dashboard: ticket list ──────────────────────────────────── */
.ea-dash-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.ea-dash-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ea-dash-gate    { text-align: center; padding: 36px 22px; }

.ea-ticket-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ea-ticket-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.03);
    text-decoration: none;
    color: #e5e7eb;
    transition: background .15s, border-color .15s;
}
.ea-ticket-row:hover       { background: rgba(10,102,194,.1); border-color: rgba(10,102,194,.35); color: #f1f5f9; }
.ea-ticket-row--unread     { border-color: rgba(10,102,194,.4); background: rgba(10,102,194,.07); }
.ea-ticket-row-main        { flex: 1; min-width: 0; }
.ea-ticket-row-title       { font-weight: 600; font-size: 14px; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.ea-ticket-row-meta        { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ea-ticket-row-aside       { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.4); flex-shrink: 0; }
.ea-ticket-date            { font-size: 12px; opacity: .6; }
.ea-reply-count            { font-size: 12px; color: #60a5fa; white-space: nowrap; }
.ea-unread-dot             { color: #0a66c2; font-size: 10px; line-height: 1; }

.ea-empty-state {
    text-align: center;
    padding: 40px 20px;
    opacity: .5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

/* ─── Thread view ─────────────────────────────────────────────── */
.ea-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #60a5fa;
    text-decoration: none;
    opacity: .8;
    transition: opacity .15s;
}
.ea-back-link:hover { opacity: 1; color: #93c5fd; }

.ea-thread-header  { margin-bottom: 16px; }

.ea-thread {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 20px 0 0;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,.07);
}

.ea-thread-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.ea-thread-item--admin  { flex-direction: row-reverse; }

.ea-thread-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    flex-shrink: 0;
    line-height: 1;
}
.ea-avatar--member { background: linear-gradient(135deg, #1e3a5f, #0a66c2); color: #bfdbfe; }
.ea-avatar--admin  { background: linear-gradient(135deg, #14532d, #16a34a); color: #bbf7d0; }

.ea-thread-bubble {
    flex: 1;
    padding: 12px 14px;
    border-radius: 12px;
    max-width: calc(100% - 48px);
}
.ea-thread-item--member .ea-thread-bubble { background: rgba(10,102,194,.12); border: 1px solid rgba(10,102,194,.2); }
.ea-thread-item--admin  .ea-thread-bubble { background: rgba(22,163,74,.1);   border: 1px solid rgba(22,163,74,.2); }

.ea-thread-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(255,255,255,.55);
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.ea-thread-meta strong  { color: rgba(255,255,255,.85); font-size: 13px; }
.ea-thread-time         { font-size: 11px; }
.ea-thread-body         { font-size: 14px; line-height: 1.65; color: #d1d5db; }

/* ─── Reply form ──────────────────────────────────────────────── */
.ea-reply-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,.07);
}
.ea-reply-heading { font-size: 15px; font-weight: 700; margin: 0 0 12px; color: #f1f5f9; }

.ea-closed-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 12px 14px;
    background: rgba(107,114,128,.1);
    border: 1px solid rgba(107,114,128,.2);
    border-radius: 10px;
    font-size: 13px;
    color: #9ca3af;
    flex-wrap: wrap;
}
.ea-closed-notice .ea-link { color: #60a5fa; margin-left: 4px; }

/* ─── Misc ────────────────────────────────────────────────────── */
.ea-link    { color: #60a5fa; text-decoration: none; }
.ea-link:hover { text-decoration: underline; }

/* ─── Responsive ──────────────────────────────────────────────── */
@media (max-width: 640px) {
    .ea-grid        { grid-template-columns: 1fr; }
    .ea-dash-header { flex-direction: column; }
    .ea-thread-item--admin { flex-direction: row; }
    .ea-thread-bubble { max-width: 100%; }
    .ea-ticket-row  { flex-direction: column; align-items: flex-start; }
    .ea-ticket-row-aside { width: 100%; justify-content: flex-end; }
}
