/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

.role-filter {
    display: flex;
    flex-direction: column;
}

.role-filter label {
    margin: 0;
    padding: 0;
    line-height: 1.4;
}

.role-filter input[type="checkbox"] {
    margin: 0;
}

button,
.button,
[type="submit"] {
    width: fit-content;
}

.password-checklist {
    list-style: none;
    padding: 0;
    margin: 4px 0 12px;
    font-size: 0.875rem;
}

.password-checklist li.passing,
.password-match-message.passing {
    color: green;
}

.password-checklist li.failing,
.password-match-message.failing {
    color: red;
}

.password-match-message {
    font-size: 0.875rem;
}

/* Calendar tabs */
.cal-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #ccc;
}
.cal-tab {
    padding: 6px 16px;
    border: 1px solid #ccc;
    border-bottom: none;
    text-decoration: none;
    color: inherit;
    background: #f0f0f0;
    margin-right: 2px;
    border-radius: 4px 4px 0 0;
    font-size: 0.9rem;
}
.cal-tab:hover {
    background: #e0e0e0;
    text-decoration: none;
}
.cal-tab--active {
    background: #fff;
    border-bottom: 2px solid #fff;
    margin-bottom: -2px;
    font-weight: bold;
}

/* Month view */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    border-top: 1px solid #ccc;
    border-left: 1px solid #ccc;
}
.calendar-cell {
    border-right: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
    padding: 4px;
    min-height: 80px;
    vertical-align: top;
}
.calendar-cell.today {
    background: #fffbe6;
}
.calendar-cell.other-month {
    background: #f5f5f5;
    color: #aaa;
}
.calendar-day-number {
    font-size: 0.75rem;
    font-weight: bold;
    margin-bottom: 2px;
}
.calendar-sailing {
    font-size: 0.7rem;
    background: #d0e8ff;
    border-radius: 3px;
    padding: 1px 3px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    position: relative;
    z-index: 1;
}
.calendar-sailing.registered {
    background: #c6f0c2;
}
.calendar-sailing.continues-right {
    margin-right: -5px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.calendar-sailing.continues-left {
    margin-left: -5px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    padding-left: 4px;
}
.calendar-sailing-time {
    display: block;
    font-size: 0.6rem;
    color: #555;
    font-weight: normal;
}

/* Week / Day time-grid views */
.cal-week-headers {
    display: flex;
    margin-left: 44px;
    margin-right: 15px;
}
.cal-week-day-header {
    flex: 1;
    text-align: center;
    padding: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-bottom: none;
}
.cal-week-day-header a {
    color: inherit;
    text-decoration: none;
}
.cal-week-day-header a:hover {
    text-decoration: underline;
}
.cal-week-day-header.today-header {
    background: #fffbe6;
}
.cal-time-gutter-spacer {
    width: 44px;
    flex-shrink: 0;
}
.cal-time-wrapper {
    display: flex;
    border: 1px solid #ccc;
}
.cal-time-gutter {
    width: 44px;
    flex-shrink: 0;
    position: relative;
    height: 1440px;
    border-right: 1px solid #e0e0e0;
}
.cal-time-label {
    position: absolute;
    right: 4px;
    font-size: 0.65rem;
    color: #888;
    transform: translateY(-50%);
    white-space: nowrap;
    line-height: 1;
}
.cal-day-col {
    flex: 1;
    position: relative;
    height: 1440px;
    border-right: 1px solid #e0e0e0;
    background-image: repeating-linear-gradient(
        to bottom,
        transparent,
        transparent 59px,
        #e0e0e0 59px,
        #e0e0e0 60px
    );
}
.cal-day-col:last-child {
    border-right: none;
}
.cal-day-col.today-col {
    background-color: rgba(255, 251, 230, 0.6);
}
.cal-sailing-block {
    position: absolute;
    left: 2px;
    right: 2px;
    background: #d0e8ff;
    border-radius: 3px;
    padding: 2px 4px;
    font-size: 0.7rem;
    overflow: hidden;
    display: block;
    text-decoration: none;
    color: inherit;
    z-index: 1;
    box-sizing: border-box;
}
.cal-sailing-block:hover {
    z-index: 2;
    opacity: 0.9;
}
.cal-sailing-block.registered {
    background: #c6f0c2;
}
.cal-sailing-time {
    display: block;
    font-size: 0.65rem;
    color: #444;
}
.cal-allday-row {
    display: flex;
    border-bottom: 2px solid #ccc;
    background: #fafafa;
}
.cal-allday-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    min-height: 28px;
    padding: 2px 0;
}
.cal-allday-day {
    margin-bottom: 4px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.cal-allday-bar {
    background: #d0e8ff;
    border-radius: 3px;
    padding: 2px 6px;
    font-size: 0.7rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    text-decoration: none;
    color: inherit;
    margin: 1px 2px;
}
.cal-allday-bar:hover {
    opacity: 0.9;
}
.cal-allday-bar.registered {
    background: #c6f0c2;
}
.cal-scroll-container {
    max-height: 70vh;
    overflow-y: auto;
    border: 1px solid #ccc;
}
.cal-scroll-container .cal-time-wrapper {
    border: none;
}
.cal-no-events {
    color: #aaa;
    text-align: center;
    padding: 2rem;
    font-size: 0.9rem;
}

/* Shared contact fields partial */
.contact-fields {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.contact-field-block {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.contact-field-block label {
    font-weight: bold;
}
.contact-address-grid {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr;
    gap: 0.75rem;
    margin-top: 0.4rem;
}
.contact-address-grid label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.2rem;
}
.contact-address-grid select,
.contact-address-grid input {
    width: 100%;
}
.contact-info-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1rem;
    align-items: center;
}
.contact-info-grid label {
    font-weight: bold;
    white-space: nowrap;
}

/* Voyage dates fieldset */
.voyage-dates {
    border: 1px solid #ccc;
    background: #f0f0f0;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}
.voyage-dates legend {
    font-weight: bold;
    padding: 0 0.25rem;
}
.voyage-dates-grid {
    display: grid;
    grid-template-columns: auto 1fr auto 1fr;
    gap: 0.5rem 1rem;
    align-items: center;
}
.voyage-dates-grid label {
    font-weight: bold;
    white-space: nowrap;
}

.wide-table {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    padding-left: 8px;
    box-sizing: border-box;
    overflow-x: auto;
}
