/* Tide Calendar Page Styles */

.tide-times-page {
    max-width: 1200px;
    margin: 0 auto;
}

.tide-times-page-section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0;
}

.tide-calendar-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.tide-calendar-day {
    background-color: #2a2a2a;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tide-calendar-day.today {
    border: 2px solid rgba(237, 166, 65, 1);
    background-color: rgba(237, 166, 65, 0.1);
}

.tide-calendar-day-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tide-calendar-date {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tide-calendar-day-name {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tide-calendar-day-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
}

.tide-calendar-month {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.tide-type-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tide-type-badge.spring {
    background-color: rgba(66, 179, 255, 1);
    color: #1a1a1a;
}

.tide-type-badge.neap {
    background-color: rgba(255, 205, 30, 1);
    color: #1a1a1a;
}

.moon-phase {
    font-size: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.moon-phase-illumination {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1;
}

.tide-calendar-events {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tide-event-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.tide-event-type {
    font-weight: 700;
    font-size: 0.85rem;
    padding: 4px 8px;
    border-radius: 4px;
    min-width: 32px;
    text-align: center;
}

.tide-event-type.hw {
    background-color: rgba(102, 179, 255, 0.2);
    color: #66b3ff;
}

.tide-event-type.lw {
    background-color: rgba(128, 196, 255, 0.2);
    color: #80c4ff;
}

.tide-chart-mini {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 60px;
    margin-bottom: 8px;
    padding: 8px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    position: relative;
    overflow: visible; /* Allow tooltips to show above bars */
}

.tide-chart-mini-wrapper {
    width: 100%;
}

.tide-chart-labels {
    display: flex;
    position: relative;
    margin-top: 4px;
    padding: 0;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.5);
}

.tide-chart-label {
    position: absolute;
    transform: translateX(-50%);
}

.tide-chart-label:first-child {
    left: 0%;
    transform: translateX(0);
    text-align: left;
}

.tide-chart-label:nth-child(2) {
    left: 25%; /* 06 is at 6/24 = 25% */
}

.tide-chart-label:nth-child(3) {
    left: 50%; /* 12 is at 12/24 = 50% */
}

.tide-chart-label:nth-child(4) {
    left: 75%; /* 18 is at 18/24 = 75% */
}

.tide-chart-label:last-child {
    left: 100%;
    transform: translateX(-100%);
    text-align: right;
}

.tide-chart-bar {
    flex: 1;
    background: linear-gradient(to top, rgba(102, 179, 255, 0.4), rgba(102, 179, 255, 0.7));
    border-radius: 2px 2px 0 0;
    min-height: 5%;
    transition: background 0.2s;
    position: relative;
    cursor: pointer;
}

.tide-chart-bar:hover {
    background: linear-gradient(to top, rgba(102, 179, 255, 0.6), rgba(102, 179, 255, 0.9));
}

.tide-bar-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.95);
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 6px;
    white-space: nowrap;
    z-index: 1000;
    font-size: 0.85rem;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: none;
}

.tide-chart-bar:hover .tide-bar-tooltip {
    display: block !important;
}

.tide-tooltip-time {
    font-weight: 600;
    margin-bottom: 4px;
    text-align: center;
}

.tide-tooltip-height {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
}

/* Badge for estimated heights on double-tide stations (Poole, Solent, etc.) */
.estimate-badge {
    display: inline-block;
    background: #ff9800;
    color: #000;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 8px;
    vertical-align: middle;
}
