/* =========================================================================
   HR-Club Boat Log — timeline stylesheet
   Palette: #FFB347 accent · #0B2A3F ink · #071E2E deep · #F5F2EC mist
   ========================================================================= */

:root {
    --hrl-accent:      #FFB347;
    --hrl-ink:         #0B2A3F;
    --hrl-deep:        #071E2E;
    --hrl-mist:        #F5F2EC;
    --hrl-warm:        #F2EDE3;
    --hrl-rust:        #c2703f;
    --hrl-border:      rgba(11, 42, 63, 0.12);
    --hrl-rail:        rgba(11, 42, 63, 0.15);
    --hrl-radius:      8px;
    --hrl-font:        system-ui, -apple-system, 'Segoe UI', sans-serif;

    /* Type colours */
    --hrl-maintenance: #2a6b9b;
    --hrl-upgrade:     #16846e;
    --hrl-voyage:      #16466a;
    --hrl-milestone:   #FFB347;
}

/* ---- Container ---- */
.hrl-timeline {
    font-family: var(--hrl-font);
    color: var(--hrl-ink);
    max-width: 760px;
    margin: 0 auto;
    padding: 0 0 48px;
}

/* =========================================================================
   COMPOSE FORM
   ========================================================================= */
.hrl-compose {
    background: var(--hrl-mist);
    border: 1px solid var(--hrl-border);
    border-radius: var(--hrl-radius);
    padding: 24px 28px 20px;
    margin-bottom: 40px;
}

.hrl-compose__heading {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--hrl-ink);
    opacity: 0.55;
    margin: 0 0 20px;
}

.hrl-compose__row {
    margin-bottom: 16px;
}

.hrl-compose__row--half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.hrl-compose__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hrl-compose__label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--hrl-ink);
    opacity: 0.6;
}

.hrl-compose__input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--hrl-border);
    border-radius: 6px;
    background: #fff;
    color: var(--hrl-ink);
    font-family: var(--hrl-font);
    font-size: 0.9rem;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.hrl-compose__input:focus {
    outline: none;
    border-color: var(--hrl-accent);
}

.hrl-compose__textarea {
    resize: vertical;
    min-height: 96px;
    line-height: 1.55;
}

.hrl-compose__select {
    cursor: pointer;
}

.hrl-compose__actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 4px;
}

/* ---- Status message ---- */
.hrl-compose__status {
    font-size: 0.85rem;
}
.hrl-status--error   { color: #b33; }
.hrl-status--success { color: #196; }

/* =========================================================================
   BUTTON
   ========================================================================= */
.hrl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 22px;
    border: none;
    border-radius: 100px;
    font-family: var(--hrl-font);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity 0.15s;
}

.hrl-btn--primary {
    background: var(--hrl-accent);
    color: var(--hrl-deep);
}

.hrl-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* =========================================================================
   FEED
   ========================================================================= */
.hrl-empty,
.hrl-gate {
    text-align: center;
    color: var(--hrl-ink);
    opacity: 0.5;
    font-size: 0.9rem;
    padding: 32px 0;
}

.hrl-gate a {
    color: var(--hrl-ink);
    text-decoration: underline;
}

/* =========================================================================
   ENTRIES
   ========================================================================= */
.hrl-feed {
    position: relative;
}

.hrl-entry {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 0 16px;
    margin-bottom: 0;
    /* New-entry animation */
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.hrl-entry--visible {
    opacity: 1;
    transform: translateY(0);
}

/* Entries that were already in the DOM on load should just be visible. */
.hrl-feed .hrl-entry {
    opacity: 1;
    transform: none;
}

/* ---- Rail (vertical line + dot) ---- */
.hrl-entry__rail {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 4px;
}

.hrl-entry__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--hrl-accent);
    flex-shrink: 0;
    z-index: 1;
}

/* Type-coloured dots */
.hrl-dot--maintenance { background: var(--hrl-maintenance); }
.hrl-dot--upgrade     { background: var(--hrl-upgrade);     }
.hrl-dot--voyage      { background: var(--hrl-voyage);      }
.hrl-dot--milestone   { background: var(--hrl-accent);      }

.hrl-entry__line {
    width: 1px;
    flex: 1;
    background: var(--hrl-rail);
    margin-top: 4px;
    margin-bottom: 0;
    min-height: 20px;
}

/* Hide the line on the very last entry */
.hrl-entry:last-child .hrl-entry__line {
    display: none;
}

/* ---- Card ---- */
.hrl-entry__card {
    background: #fff;
    border: 1px solid var(--hrl-border);
    border-radius: var(--hrl-radius);
    padding: 16px 20px;
    margin-bottom: 16px;
}

.hrl-entry__header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.hrl-entry__date {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--hrl-ink);
    opacity: 0.7;
}

.hrl-entry__author {
    font-size: 0.8rem;
    color: var(--hrl-ink);
    opacity: 0.45;
}

.hrl-entry__content {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--hrl-ink);
}

.hrl-entry__content p {
    margin: 0 0 0.6em;
}
.hrl-entry__content p:last-child {
    margin-bottom: 0;
}

/* =========================================================================
   TYPE TAGS
   ========================================================================= */
.hrl-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    background: var(--hrl-ink);
}

.hrl-tag--maintenance { background: var(--hrl-maintenance); }
.hrl-tag--upgrade     { background: var(--hrl-upgrade);     }
.hrl-tag--voyage      { background: var(--hrl-voyage);      }
.hrl-tag--milestone   { background: var(--hrl-rust); color: #fff; }

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 540px) {
    .hrl-compose {
        padding: 20px 16px;
    }
    .hrl-compose__row--half {
        grid-template-columns: 1fr;
    }
}
