/* ═══════════════════════════════════════════════════════
   Roll Call — ShipTea Cruise Ship Database
   Namespace: .stcdb-rc-*
   ═══════════════════════════════════════════════════════ */

/* ── Variables ────────────────────────────────────────── */
.stcdb-rc-wrapper {
    --rc-ocean: #0077B6;
    --rc-teal: #008080;
    --rc-sunset: #FF6B35;
    --rc-sand: #FFF1E6;
    --rc-navy: #023E73;
    --rc-green: #2A9D8F;
    --rc-light: #f8f9fa;
    --rc-border: #e0e0e0;
    --rc-text: #2d3436;
    --rc-muted: #636e72;
    --rc-radius: 12px;
    --rc-shadow: 0 2px 8px rgba(0,0,0,.08);
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
    color: var(--rc-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ── Breadcrumb ───────────────────────────────────────── */
.stcdb-rc-breadcrumb {
    font-size: .85rem;
    color: var(--rc-muted);
    margin-bottom: 1.25rem;
}
.stcdb-rc-breadcrumb a {
    color: var(--rc-ocean);
    text-decoration: none;
}
.stcdb-rc-breadcrumb a:hover {
    text-decoration: underline;
}
.stcdb-rc-breadcrumb span {
    margin: 0 .35rem;
}

/* ── Page Header ──────────────────────────────────────── */
.stcdb-rc-header {
    text-align: center;
    margin-bottom: 2rem;
}
.stcdb-rc-header h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--rc-navy);
    margin: 0 0 .5rem;
}
.stcdb-rc-header p {
    color: var(--rc-muted);
    font-size: 1.05rem;
    margin: 0;
}

/* ── Ship Data Card ───────────────────────────────────── */
.stcdb-rc-ship-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.25rem;
    background: white;
    border: 1px solid var(--rc-border);
    border-radius: var(--rc-radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--rc-shadow);
}
.stcdb-rc-ship-image {
    width: 140px;
    height: 100px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--rc-light);
}
.stcdb-rc-ship-info h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--rc-navy);
    margin: 0 0 .25rem;
}
.stcdb-rc-ship-info h2 a {
    color: inherit;
    text-decoration: none;
}
.stcdb-rc-ship-info h2 a:hover {
    color: var(--rc-ocean);
}
.stcdb-rc-ship-line {
    color: var(--rc-muted);
    font-size: .9rem;
    margin: 0 0 .75rem;
}
.stcdb-rc-scores {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.stcdb-rc-score-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .8rem;
    font-weight: 600;
    padding: .3rem .65rem;
    border-radius: 20px;
    background: var(--rc-light);
    border: 1px solid var(--rc-border);
}
.stcdb-rc-score-badge--cdc {
    color: #0077B6;
}
.stcdb-rc-score-badge--food {
    color: #2A9D8F;
}
.stcdb-rc-score-badge--green {
    color: #008080;
}

/* ── Sailing Info ─────────────────────────────────────── */
.stcdb-rc-sailing-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: .75rem;
    background: var(--rc-sand);
    border-radius: var(--rc-radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}
.stcdb-rc-sailing-detail {
    text-align: center;
}
.stcdb-rc-sailing-detail strong {
    display: block;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--rc-muted);
    margin-bottom: .2rem;
}
.stcdb-rc-sailing-detail span {
    font-size: 1rem;
    font-weight: 600;
    color: var(--rc-navy);
}

/* ── Ports List ───────────────────────────────────────── */
.stcdb-rc-ports {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-bottom: 1.5rem;
}
.stcdb-rc-port-chip {
    font-size: .78rem;
    padding: .25rem .6rem;
    background: white;
    border: 1px solid var(--rc-border);
    border-radius: 16px;
    color: var(--rc-text);
}

/* ── Participant Stats Bar ────────────────────────────── */
.stcdb-rc-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    background: white;
    border: 1px solid var(--rc-border);
    border-radius: var(--rc-radius);
}
.stcdb-rc-stats-count {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--rc-navy);
}
.stcdb-rc-stats-chips {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}
.stcdb-rc-chip {
    font-size: .75rem;
    padding: .2rem .55rem;
    border-radius: 12px;
    background: var(--rc-light);
    color: var(--rc-muted);
    font-weight: 500;
}

/* ── Auth / Join Form ─────────────────────────────────── */
.stcdb-rc-auth-box {
    background: white;
    border: 2px solid var(--rc-ocean);
    border-radius: var(--rc-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}
.stcdb-rc-auth-box h3 {
    font-size: 1.15rem;
    color: var(--rc-navy);
    margin: 0 0 .75rem;
}
.stcdb-rc-auth-row {
    display: flex;
    gap: .5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: .75rem;
}
.stcdb-rc-input {
    padding: .6rem .85rem;
    border: 1px solid var(--rc-border);
    border-radius: 8px;
    font-size: .95rem;
    min-width: 200px;
    outline: none;
    transition: border-color .2s;
}
.stcdb-rc-input:focus {
    border-color: var(--rc-ocean);
    box-shadow: 0 0 0 3px rgba(0,119,182,.12);
}
.stcdb-rc-btn {
    padding: .6rem 1.25rem;
    background: var(--rc-ocean);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, transform .1s;
}
.stcdb-rc-btn:hover {
    background: var(--rc-navy);
}
.stcdb-rc-btn:active {
    transform: scale(.97);
}
.stcdb-rc-btn--secondary {
    background: transparent;
    color: var(--rc-ocean);
    border: 1px solid var(--rc-ocean);
}
.stcdb-rc-btn--secondary:hover {
    background: var(--rc-ocean);
    color: white;
}
.stcdb-rc-btn--sunset {
    background: var(--rc-sunset);
}
.stcdb-rc-btn--sunset:hover {
    background: #e05a2a;
}
.stcdb-rc-btn--small {
    padding: .35rem .75rem;
    font-size: .82rem;
}
.stcdb-rc-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}
.stcdb-rc-msg {
    font-size: .85rem;
    margin-top: .5rem;
    min-height: 1.2em;
}
.stcdb-rc-msg--success {
    color: var(--rc-green);
}
.stcdb-rc-msg--error {
    color: #E63946;
}

/* ── Code Verification ────────────────────────────────── */
.stcdb-rc-code-input {
    letter-spacing: .4em;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    max-width: 180px;
    font-family: monospace;
}

/* ── Join Form (authenticated) ────────────────────────── */
.stcdb-rc-join-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
    margin-bottom: 1rem;
}
.stcdb-rc-join-form label {
    font-size: .82rem;
    font-weight: 600;
    color: var(--rc-muted);
    display: block;
    margin-bottom: .25rem;
}
.stcdb-rc-select {
    width: 100%;
    padding: .5rem .7rem;
    border: 1px solid var(--rc-border);
    border-radius: 8px;
    font-size: .9rem;
    background: white;
}
.stcdb-rc-join-note {
    grid-column: 1 / -1;
}
.stcdb-rc-textarea {
    width: 100%;
    padding: .5rem .7rem;
    border: 1px solid var(--rc-border);
    border-radius: 8px;
    font-size: .9rem;
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
}

/* ── Participants Grid ────────────────────────────────── */
.stcdb-rc-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--rc-navy);
    margin: 0 0 1rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--rc-ocean);
}
.stcdb-rc-participants {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: .75rem;
    margin-bottom: 2rem;
}
.stcdb-rc-participant {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    background: white;
    border: 1px solid var(--rc-border);
    border-radius: 10px;
    padding: .85rem;
    transition: box-shadow .2s;
}
.stcdb-rc-participant:hover {
    box-shadow: var(--rc-shadow);
}
.stcdb-rc-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}
.stcdb-rc-participant-info h4 {
    font-size: .92rem;
    font-weight: 600;
    margin: 0 0 .2rem;
    color: var(--rc-text);
}
.stcdb-rc-participant-badges {
    display: flex;
    gap: .35rem;
    flex-wrap: wrap;
    margin-bottom: .25rem;
}
.stcdb-rc-badge {
    font-size: .68rem;
    padding: .1rem .4rem;
    border-radius: 8px;
    background: var(--rc-light);
    color: var(--rc-muted);
    font-weight: 500;
    text-transform: capitalize;
}
.stcdb-rc-participant-bio {
    font-size: .8rem;
    color: var(--rc-muted);
    line-height: 1.35;
    margin: 0;
}

/* ── Discussion Thread ────────────────────────────────── */
.stcdb-rc-discussions {
    margin-bottom: 2rem;
}
.stcdb-rc-post {
    background: white;
    border: 1px solid var(--rc-border);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: .75rem;
}
.stcdb-rc-post-header {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: .5rem;
}
.stcdb-rc-post-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}
.stcdb-rc-post-name {
    font-weight: 600;
    font-size: .9rem;
    color: var(--rc-text);
}
.stcdb-rc-post-time {
    font-size: .75rem;
    color: var(--rc-muted);
    margin-left: auto;
}
.stcdb-rc-post-content {
    font-size: .92rem;
    line-height: 1.5;
    margin-bottom: .5rem;
    word-break: break-word;
}
.stcdb-rc-post-actions {
    display: flex;
    gap: .75rem;
}
.stcdb-rc-post-action {
    font-size: .78rem;
    color: var(--rc-ocean);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-weight: 500;
}
.stcdb-rc-post-action:hover {
    text-decoration: underline;
}

/* ── Replies ──────────────────────────────────────────── */
.stcdb-rc-replies {
    margin-left: 2rem;
    border-left: 2px solid var(--rc-border);
    padding-left: .75rem;
}
.stcdb-rc-replies .stcdb-rc-post {
    border: none;
    background: var(--rc-light);
    margin-bottom: .5rem;
    padding: .75rem;
}

/* ── Post Form ────────────────────────────────────────── */
.stcdb-rc-post-form {
    background: white;
    border: 1px solid var(--rc-border);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
}
.stcdb-rc-post-form textarea {
    width: 100%;
    min-height: 80px;
    padding: .6rem;
    border: 1px solid var(--rc-border);
    border-radius: 8px;
    font-size: .92rem;
    font-family: inherit;
    resize: vertical;
    margin-bottom: .5rem;
}
.stcdb-rc-post-form textarea:focus {
    outline: none;
    border-color: var(--rc-ocean);
}

/* ── Reply Form (inline) ─────────────────────────────── */
.stcdb-rc-reply-form {
    margin-top: .5rem;
    display: flex;
    gap: .5rem;
}
.stcdb-rc-reply-form input {
    flex: 1;
    padding: .4rem .6rem;
    border: 1px solid var(--rc-border);
    border-radius: 8px;
    font-size: .85rem;
}
.stcdb-rc-reply-form input:focus {
    outline: none;
    border-color: var(--rc-ocean);
}

/* ── Browser Page ─────────────────────────────────────── */
.stcdb-rc-hero {
    text-align: center;
    background: linear-gradient(135deg, var(--rc-navy) 0%, var(--rc-ocean) 100%);
    color: white;
    padding: 2.5rem 1.5rem;
    border-radius: var(--rc-radius);
    margin-bottom: 2rem;
}
.stcdb-rc-hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0 0 .5rem;
    color: white;
}
.stcdb-rc-hero p {
    font-size: 1.05rem;
    opacity: .9;
    margin: 0 0 1.5rem;
}
.stcdb-rc-search-row {
    display: flex;
    gap: .5rem;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 600px;
    margin: 0 auto;
}
.stcdb-rc-search-row .stcdb-rc-input {
    flex: 1;
    min-width: 180px;
    background: rgba(255,255,255,.95);
}

/* ── Filters ──────────────────────────────────────────── */
.stcdb-rc-filters {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding: .75rem 1rem;
    background: var(--rc-light);
    border-radius: var(--rc-radius);
}
.stcdb-rc-filters select,
.stcdb-rc-filters input[type="month"] {
    padding: .45rem .65rem;
    border: 1px solid var(--rc-border);
    border-radius: 8px;
    font-size: .85rem;
    background: white;
}
.stcdb-rc-filters label {
    display: flex;
    align-items: center;
    gap: .3rem;
    font-size: .85rem;
    color: var(--rc-muted);
    cursor: pointer;
}

/* ── Sailing Cards Grid ───────────────────────────────── */
.stcdb-rc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.stcdb-rc-card {
    display: block;
    background: white;
    border: 1px solid var(--rc-border);
    border-radius: var(--rc-radius);
    padding: 1.1rem;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .2s, border-color .2s;
}
.stcdb-rc-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
    border-color: var(--rc-ocean);
}
.stcdb-rc-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: .5rem;
}
.stcdb-rc-card-ship {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--rc-navy);
}
.stcdb-rc-card-count {
    font-size: .78rem;
    font-weight: 600;
    padding: .2rem .55rem;
    border-radius: 12px;
    background: var(--rc-sand);
    color: var(--rc-sunset);
    white-space: nowrap;
}
.stcdb-rc-card-line {
    font-size: .82rem;
    color: var(--rc-muted);
    margin-bottom: .5rem;
}
.stcdb-rc-card-details {
    display: flex;
    gap: .75rem;
    font-size: .82rem;
    color: var(--rc-text);
    margin-bottom: .4rem;
}
.stcdb-rc-card-ports {
    font-size: .78rem;
    color: var(--rc-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Related Sailings ─────────────────────────────────── */
.stcdb-rc-related {
    margin-top: 2rem;
}
.stcdb-rc-related-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: .75rem;
}

/* ── Profile Page ─────────────────────────────────────── */
.stcdb-rc-profile {
    max-width: 700px;
    margin: 0 auto;
}
.stcdb-rc-profile-card {
    background: white;
    border: 1px solid var(--rc-border);
    border-radius: var(--rc-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.stcdb-rc-profile-header {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}
.stcdb-rc-profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}
.stcdb-rc-profile-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
}
.stcdb-rc-profile-form .stcdb-rc-field--full {
    grid-column: 1 / -1;
}
.stcdb-rc-profile-form label {
    font-size: .8rem;
    font-weight: 600;
    color: var(--rc-muted);
    display: block;
    margin-bottom: .2rem;
}

/* ── My Sailings List ─────────────────────────────────── */
.stcdb-rc-my-sailing {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border: 1px solid var(--rc-border);
    border-radius: 10px;
    padding: .85rem 1rem;
    margin-bottom: .5rem;
    transition: box-shadow .2s;
}
.stcdb-rc-my-sailing:hover {
    box-shadow: var(--rc-shadow);
}
.stcdb-rc-my-sailing-info h4 {
    font-size: .95rem;
    font-weight: 600;
    margin: 0 0 .15rem;
}
.stcdb-rc-my-sailing-info h4 a {
    color: var(--rc-navy);
    text-decoration: none;
}
.stcdb-rc-my-sailing-info h4 a:hover {
    color: var(--rc-ocean);
}
.stcdb-rc-my-sailing-info p {
    font-size: .82rem;
    color: var(--rc-muted);
    margin: 0;
}
.stcdb-rc-my-sailing-meta {
    text-align: right;
    font-size: .8rem;
    color: var(--rc-muted);
}

/* ── Loading / Empty State ────────────────────────────── */
.stcdb-rc-loading {
    text-align: center;
    padding: 2rem;
    color: var(--rc-muted);
}
.stcdb-rc-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--rc-border);
    border-top-color: var(--rc-ocean);
    border-radius: 50%;
    animation: stcdb-rc-spin .6s linear infinite;
    margin-left: .5rem;
    vertical-align: middle;
}
@keyframes stcdb-rc-spin {
    to { transform: rotate(360deg); }
}
.stcdb-rc-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--rc-muted);
}
.stcdb-rc-empty p {
    font-size: 1.05rem;
}

/* ── Load More ────────────────────────────────────────── */
.stcdb-rc-load-more {
    text-align: center;
    margin: 1.5rem 0;
}

/* ── Hidden ───────────────────────────────────────────── */
.stcdb-rc-hidden {
    display: none !important;
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 768px) {
    .stcdb-rc-wrapper {
        padding: 1rem .75rem 2rem;
    }
    .stcdb-rc-header h1 {
        font-size: 1.5rem;
    }
    .stcdb-rc-hero h1 {
        font-size: 1.6rem;
    }
    .stcdb-rc-ship-card {
        grid-template-columns: 1fr;
    }
    .stcdb-rc-ship-image {
        width: 100%;
        height: 120px;
    }
    .stcdb-rc-sailing-info {
        grid-template-columns: 1fr 1fr;
    }
    .stcdb-rc-join-form {
        grid-template-columns: 1fr;
    }
    .stcdb-rc-participants {
        grid-template-columns: 1fr;
    }
    .stcdb-rc-grid {
        grid-template-columns: 1fr;
    }
    .stcdb-rc-replies {
        margin-left: 1rem;
    }
    .stcdb-rc-profile-form {
        grid-template-columns: 1fr;
    }
    .stcdb-rc-filters {
        flex-direction: column;
    }
    .stcdb-rc-my-sailing {
        flex-direction: column;
        align-items: flex-start;
        gap: .5rem;
    }
    .stcdb-rc-my-sailing-meta {
        text-align: left;
    }
}
