/* ============================================================
   Rexxers Help Desk — Customer-Facing Styles
   Fonts: Comfortaa (headings), Montserrat (body)
   Primary: #f15048 | Dark: #d63c35 | Light: #fff8f8
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@400;600;700&family=Montserrat:wght@400;500;600;700&display=swap');

/* ----- Reset & Base ----- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: 'Montserrat', sans-serif;
    background: #f6f6f6;
    color: #333;
    line-height: 1.65;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ----- Typography ----- */
h1, h2, h3, h4 {
    font-family: 'Comfortaa', cursive;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.25;
}
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }

a { color: #f15048; text-decoration: none; }
a:hover { text-decoration: underline; color: #d63c35; }

/* ----- Header — pink to match staff sidebar logo bar ----- */
.site-header {
    background: #ffcccc;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}
.site-logo {
    display: flex;
    align-items: center;
    gap: 0;
    text-decoration: none;
}
/* Logo image fills the header height naturally */
.site-logo img { height: 52px; width: auto; }
.site-logo-text {
    font-family: 'Comfortaa', cursive;
    font-size: 1.1rem;
    font-weight: 700;
    color: #5a0a0a;
}
.site-logo-text span { color: #f15048; }
.header-nav { display: flex; gap: 6px; align-items: center; }
.header-nav a {
    color: #6b1919;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
    text-decoration: none;
}
.header-nav a:hover { background: rgba(0,0,0,0.1); color: #3d0000; text-decoration: none; }
.header-nav a.btn-primary {
    background: #f15048;
    color: #fff;
}
.header-nav a.btn-primary:hover { background: #d63c35; color: #fff; }

/* ----- Hero ----- */
.hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #2e2e2e 100%);
    padding: 60px 24px;
    text-align: center;
    color: #fff;
}
.hero h1 { color: #fff; font-size: 2.25rem; margin-bottom: 12px; }
.hero p { color: #bbb; font-size: 1.05rem; max-width: 560px; margin: 0 auto 28px; }

/* ----- Main Content ----- */
.main-content { flex: 1; padding: 40px 24px; }
.container { max-width: 780px; margin: 0 auto; }
.container-wide { max-width: 1100px; margin: 0 auto; }

/* ----- Cards ----- */
.card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    padding: 36px;
    margin-bottom: 24px;
}
.card-header {
    border-bottom: 2px solid #f15048;
    padding-bottom: 16px;
    margin-bottom: 28px;
}
.card-header h2 { color: #f15048; font-size: 1.35rem; }
.card-header p { color: #666; margin-top: 4px; font-size: 0.9rem; }

/* ----- Forms ----- */
.form-group { margin-bottom: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
}
label .req { color: #f15048; margin-left: 2px; }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 11px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 7px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.925rem;
    color: #333;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
input:focus, select:focus, textarea:focus {
    border-color: #f15048;
    box-shadow: 0 0 0 3px rgba(241,80,72,0.12);
}
textarea { min-height: 140px; resize: vertical; }

.form-help { font-size: 0.8rem; color: #888; margin-top: 4px; }
.form-error { font-size: 0.8rem; color: #d63c35; margin-top: 4px; }

/* ----- Buttons ----- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 11px 24px;
    border: none;
    border-radius: 7px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.925rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
    text-decoration: none;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
    background: #f15048;
    color: #fff;
    box-shadow: 0 2px 8px rgba(241,80,72,0.3);
}
.btn-primary:hover { background: #d63c35; box-shadow: 0 4px 12px rgba(241,80,72,0.4); text-decoration: none; color: #fff; }
.btn-secondary {
    background: #f0f0f0;
    color: #444;
}
.btn-secondary:hover { background: #e0e0e0; text-decoration: none; color: #333; }
.btn-outline {
    background: transparent;
    border: 2px solid #f15048;
    color: #f15048;
}
.btn-outline:hover { background: #f15048; color: #fff; text-decoration: none; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-sm { padding: 7px 14px; font-size: 0.8rem; }
.btn-full { width: 100%; justify-content: center; }

/* ----- Alerts ----- */
.alert {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border-left: 4px solid transparent;
}
.alert-success { background: #f0fdf4; color: #15803d; border-color: #4eab3f; }
.alert-error   { background: #fff5f5; color: #c0392b; border-color: #f15048; }
.alert-info    { background: #eff6ff; color: #1d4ed8; border-color: #0676a4; }
.alert-warning { background: #fffbeb; color: #b45309; border-color: #e3b107; }

/* ----- Ticket Status Page ----- */
.ticket-status-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}
.ticket-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.ticket-meta-item {
    background: #f6f6f6;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 0.85rem;
}
.ticket-meta-item strong { display: block; color: #888; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 2px; }

.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item { display: flex; gap: 16px; }
.timeline-line { display: flex; flex-direction: column; align-items: center; }
.timeline-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #f15048;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #f15048;
    flex-shrink: 0;
    margin-top: 6px;
}
.timeline-dot.staff  { background: #f15048; box-shadow: 0 0 0 2px #f15048; }
.timeline-dot.customer { background: #0676a4; box-shadow: 0 0 0 2px #0676a4; }
.timeline-connector { width: 2px; background: #e0e0e0; flex: 1; min-height: 20px; }
.timeline-content {
    flex: 1;
    background: #f9f9f9;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 16px;
    border: 1px solid #eee;
}
.timeline-content.staff-reply { background: #fff8f8; border-color: #fcc1bd; }
.timeline-content.customer-reply { background: #f0f7ff; border-color: #d4ebf2; }
.timeline-meta { font-size: 0.8rem; color: #888; margin-bottom: 8px; }
.timeline-meta strong { color: #444; }

/* ----- Badges ----- */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.badge-open     { background: #eff6ff; color: #1d4ed8; }
.badge-waiting  { background: #fffbeb; color: #b45309; }
.badge-resolved { background: #f0fdf4; color: #15803d; }
.badge-closed   { background: #f3f4f6; color: #6b7280; }

/* ----- Check Status Form ----- */
.status-tabs { display: flex; gap: 4px; margin-bottom: 28px; }
.status-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 7px 7px 0 0;
    border: 2px solid #e0e0e0;
    border-bottom: none;
    background: #f6f6f6;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}
.status-tab.active { background: #fff; border-color: #f15048; color: #f15048; }

/* ----- Footer ----- */
.site-footer {
    background: #1a1a1a;
    color: #888;
    text-align: center;
    padding: 24px;
    font-size: 0.8rem;
    margin-top: auto;
}
.site-footer a { color: #f15048; }

/* ----- Embed mode (iframe) ----- */
body.embed-mode {
    background: transparent;
}
body.embed-mode .site-header,
body.embed-mode .site-footer { display: none; }
body.embed-mode .main-content { padding: 0; }
body.embed-mode .card { box-shadow: none; border-radius: 0; margin: 0; }

/* ----- Responsive ----- */
@media (max-width: 600px) {
    .form-row { grid-template-columns: 1fr; }
    .card { padding: 22px; }
    .hero h1 { font-size: 1.65rem; }
    .header-nav a:not(.btn-primary) { display: none; }
}
