/* =========================================================
   Marine Add Service — guest/service selection page
   Used by 4.9, 4.10, 4.11 (Phase 4C). Aesthetic matches
   marine-detail.css (navy #0F1C3E, ghost / primary buttons).
   ========================================================= */

/* ── Page header zone — context summary ── */
.marine-add-service-header {
    background: #ffffff;
    border: 1px solid #e1e6ec;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    padding: 18px 22px;
    margin-bottom: 18px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}
.mas-header-title h2 {
    margin: 0 0 6px;
    color: #0F1C3E;
    font-size: 20px;
    font-weight: 600;
}
.mas-header-subtitle {
    margin: 0;
    color: #6b7684;
    font-size: 13px;
    line-height: 1.5;
}
.mas-header-meta {
    flex-shrink: 0;
    min-width: 240px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 12px;
}
.mas-meta-row {
    display: flex;
    gap: 6px;
    align-items: baseline;
}
.mas-meta-label {
    color: #6b7684;
    font-weight: 500;
    min-width: 60px;
}
.mas-meta-value {
    color: #243b53;
    font-weight: 600;
}

/* ── Generic card — sectioned panel matching marine-hierarchy-card ── */
.mas-card {
    background: #ffffff;
    border: 1px solid #e1e6ec;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    padding: 18px 22px;
    margin-bottom: 14px;
}
.mas-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}
.mas-card-title {
    margin: 0 0 10px;
    color: #0F1C3E;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-bottom: 1px solid #eef1f5;
    padding-bottom: 8px;
}
.mas-card-header .mas-card-title { margin-bottom: 0; border: none; padding: 0; }
.mas-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.mas-card-hint {
    margin: 4px 0 12px;
    color: #6b7684;
    font-size: 12px;
}

/* ── Empty-state card — 4.10 hotel-only marker ── */
.mas-empty-card {
    text-align: center;
    padding: 36px 22px;
}
.mas-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff5e0;
    color: #b07a18;
    font-weight: 700;
    font-size: 22px;
    margin-bottom: 14px;
}
.mas-empty-title {
    color: #243b53;
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 6px;
}
.mas-empty-body {
    color: #6b7684;
    font-size: 13px;
    margin: 0 0 16px;
}
.mas-empty-actions {
    margin: 0;
}

/* ── Service-type radio (4.10) — large card-style choices ── */
.mas-radio-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.mas-radio-card {
    flex: 1 1 200px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border: 1px solid #d4dae0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    background: #ffffff;
}
.mas-radio-card:hover {
    border-color: #a9b3c0;
    background: #f7faff;
}
.mas-radio-card input[type="radio"] {
    margin: 0;
    flex-shrink: 0;
}
.mas-radio-card input[type="radio"]:checked ~ .mas-radio-icon,
.mas-radio-card input[type="radio"]:checked ~ .mas-radio-label {
    color: #0F1C3E;
    font-weight: 600;
}
.mas-radio-card:has(input[type="radio"]:checked) {
    border-color: #0F1C3E;
    background: #f0f4fa;
    box-shadow: 0 0 0 1px #0F1C3E inset;
}
.mas-radio-icon {
    color: #6b7684;
    display: inline-flex;
}
.mas-radio-label {
    color: #243b53;
    font-size: 14px;
    font-weight: 500;
}

/* ── Mode selector (4.11 — Existing | Add new) ── */
.mas-mode-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.mas-mode-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid #d4dae0;
    border-radius: 4px;
    cursor: pointer;
    background: #ffffff;
}
.mas-mode-row:hover {
    background: #f7faff;
}
.mas-mode-row input[type="radio"]:disabled + .mas-mode-label {
    color: #aaaaaa;
    cursor: not-allowed;
}
.mas-mode-label {
    color: #243b53;
    font-size: 13px;
    font-weight: 500;
}
.mas-mode-disabled-note {
    font-size: 11px;
    color: #aaaaaa;
    margin-left: 6px;
    font-weight: normal;
}

/* ── Existing guests checkbox list ── */
.mas-existing-guests-card {
    /* default visible */
}
.mas-pax-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 8px;
    margin-top: 6px;
}
.mas-pax-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #e1e6ec;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.12s ease;
    background: #ffffff;
}
.mas-pax-row:hover {
    border-color: #a9b3c0;
    background: #f7faff;
}
.mas-pax-row:has(input[type="checkbox"]:checked) {
    border-color: #0F1C3E;
    background: #f0f4fa;
    box-shadow: 0 0 0 1px #0F1C3E inset;
}
.mas-pax-checkbox {
    margin: 2px 0 0;
    flex-shrink: 0;
    cursor: pointer;
}
.mas-pax-card {
    flex: 1;
    min-width: 0;
}
.mas-pax-name {
    color: #0F1C3E;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
}
.mas-pax-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 11px;
    color: #6b7684;
}
.mas-pax-detail-item {
    display: inline-block;
}
.mas-pax-detail-label {
    color: #8b95a3;
    margin-right: 3px;
}
.mas-pax-detail-missing {
    color: #b8c0cb;
    font-style: italic;
}

/* ── Count indicator + error hint ── */
.mas-count-indicator {
    font-size: 12px;
    color: #243b53;
    background: #eef1f5;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 500;
}
.mas-count-indicator.mas-count-over {
    background: #fbeae7;
    color: #8a2a22;
}
.mas-error-hint {
    margin: 10px 0 0;
    color: #b7352c;
    font-size: 12px;
    font-weight: 500;
}

/* ── New guests count input ── */
.mas-new-guests-card {
    /* default hidden when mode=existing — toggled by JS */
}
.mas-count-input-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.mas-count-input-label {
    color: #243b53;
    font-size: 13px;
    font-weight: 500;
}
.mas-count-select {
    border: 1px solid #c5ccd6;
    border-radius: 3px;
    padding: 5px 8px;
    font-size: 13px;
    min-width: 80px;
    background: #ffffff;
}
.mas-count-select:focus {
    outline: none;
    border-color: #0F1C3E;
    box-shadow: 0 0 0 2px rgba(15, 28, 62, 0.12);
}

/* ── Action row at bottom ── */
.mas-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 18px;
    margin-bottom: 32px;
    gap: 12px;
}
.mas-continue-btn {
    /* primary action — uses .marine-btn-primary base, just bigger */
    padding: 8px 22px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
}
.mas-continue-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── Responsive — narrower viewports ── */
@media (max-width: 720px) {
    .marine-add-service-header {
        flex-direction: column;
        gap: 14px;
    }
    .mas-header-meta {
        min-width: 0;
    }
    .mas-pax-list {
        grid-template-columns: 1fr;
    }
}

/* ─────────────────────────────────────────────────────────
   Read-only render in marine wizard Step 3 (Phase 4C)
   ───────────────────────────────────────────────────────── */
.mas-readonly-value {
    color: #243b53;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 10px;
    background: #f0f4fa;
    border: 1px solid #d4dae0;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 240px;
}
.mas-readonly-tag {
    display: inline-block;
    background: #0F1C3E;
    color: #ffffff;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 10px;
}
.mas-readonly-banner {
    background: #f0f4fa;
    border-left: 3px solid #0F1C3E;
    padding: 10px 14px;
    margin: 0 0 12px;
    color: #243b53;
    font-size: 12px;
    border-radius: 0 3px 3px 0;
}
.mas-readonly-pax-card {
    background: #f7faff;
    border: 1px solid #e0e8f0;
    border-radius: 4px;
    padding: 10px 14px;
    margin-bottom: 8px;
}
.mas-readonly-pax-name {
    color: #0F1C3E;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 5px;
}
.mas-readonly-pax-details {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: #6b7684;
    font-size: 11px;
}
.mas-readonly-pax-details > span {
    white-space: nowrap;
}
.mas-readonly-missing {
    color: #b8c0cb;
    font-style: italic;
}
