/* ========================================
   HELMET SIZE GUIDE MODAL
   Theme: Pilot / Rebelhorn-inspired
   Colors: Black primary, red accent, white text
   ======================================== */

.helmet-size-modal {
    position: fixed;
    inset: 0;
    z-index: 9990;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.helmet-size-modal.open {
    opacity: 1;
    visibility: visible;
}

/* Overlay */
.helmet-size-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(6px);
    cursor: pointer;
}

/* Dialog box */
.helmet-size-modal__dialog {
    position: relative;
    background: var(--color-secondary, #1a1a1a);
    color: var(--color-white, #fff);
    border-top: 3px solid var(--color-accent, #ff0000);
    border-radius: 2px;
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.helmet-size-modal.open .helmet-size-modal__dialog {
    transform: translateY(0);
}

/* Scrollbar styling inside dialog */
.helmet-size-modal__dialog::-webkit-scrollbar { width: 5px; }
.helmet-size-modal__dialog::-webkit-scrollbar-track { background: var(--color-primary, #000); }
.helmet-size-modal__dialog::-webkit-scrollbar-thumb { background: var(--color-accent, #ff0000); border-radius: 2px; }

/* Close button */
.helmet-size-modal__close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    background: transparent;
    border: none;
    color: var(--color-white, #fff);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem 0.4rem;
    border-radius: 2px;
    opacity: 0.7;
    transition: opacity 0.2s, background 0.2s;
}

.helmet-size-modal__close:hover {
    opacity: 1;
    background: rgba(255, 0, 0, 0.15);
    color: var(--color-accent, #ff0000);
}

/* Header */
.helmet-size-modal__header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 1.5rem 1.5rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.helmet-size-modal__header-icon {
    font-size: 1.6rem;
    color: var(--color-accent, #ff0000);
    flex-shrink: 0;
}

.helmet-size-modal__title {
    font-family: var(--font-family-heading, 'Play', sans-serif);
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-white, #fff);
}

/* Body */
.helmet-size-modal__body {
    padding: 1.25rem 1.5rem 1.5rem;
}

/* Measure banner */
.helmet-size-modal__measure-banner {
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid var(--color-accent, #ff0000);
    border-radius: 2px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.helmet-size-modal__measure-heading {
    font-family: var(--font-family-heading, 'Play', sans-serif);
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: capitalize;
    letter-spacing: 0.05em;
    color: var(--color-white, #fff);
    margin: 0 0 0.4rem;
}

.helmet-size-modal__measure-desc {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.72);
    margin: 0;
    line-height: 1.55;
}

/* Section title (ribbon style) */
.helmet-size-modal__section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.helmet-size-modal__section-title::before,
.helmet-size-modal__section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.18);
}

.helmet-size-modal__section-title span {
    font-family: var(--font-family-heading, 'Play', sans-serif);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-white, #fff);
    background: var(--color-accent, #ff0000);
    padding: 0.2rem 0.9rem;
    border-radius: 2px;
    white-space: nowrap;
}

/* Table */
.helmet-size-modal__table-wrapper {
    margin-bottom: 1.5rem;
    border-radius: 2px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.helmet-size-modal__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.helmet-size-modal__table thead tr {
    background: var(--color-primary, #000);
}

.helmet-size-modal__table thead th {
    padding: 0.7rem 1rem;
    font-family: var(--font-family-heading, 'Play', sans-serif);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    text-align: left;
}

.helmet-size-modal__table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.15s;
}

.helmet-size-modal__table tbody tr:last-child {
    border-bottom: none;
}

.helmet-size-modal__table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.helmet-size-modal__table tbody td {
    padding: 0.65rem 1rem;
    color: rgba(255, 255, 255, 0.85);
    vertical-align: middle;
}

/* Size label inside table */
.helmet-size-modal__size {
    font-family: var(--font-family-heading, 'Play', sans-serif);
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-white, #fff);
    display: inline-block;
    min-width: 3rem;
}

.helmet-size-modal__size--accent {
    color: var(--color-accent, #ff0000);
}

/* Footer grid: tips + note */
.helmet-size-modal__footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 0.25rem;
}

@media (max-width: 520px) {
    .helmet-size-modal__footer-grid {
        grid-template-columns: 1fr;
    }
}

/* Fit tips */
.helmet-size-modal__tips-heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-family-heading, 'Play', sans-serif);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-white, #fff);
    margin: 0 0 0.75rem;
}

.helmet-size-modal__tips-line {
    flex: 1;
    height: 2px;
    background: var(--color-accent, #ff0000);
    display: block;
}

.helmet-size-modal__tips-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.helmet-size-modal__tips-list li {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
}

.helmet-size-modal__tips-list li .bi {
    color: var(--color-accent, #ff0000);
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* Note box */
.helmet-size-modal__note {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    padding: 0.9rem 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.55;
}

.helmet-size-modal__note-icon {
    color: var(--color-warning, #ffc107);
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 0.05rem;
}

.helmet-size-modal__note strong {
    color: var(--color-white, #fff);
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .helmet-size-modal__header { padding: 1.1rem 1rem 0.65rem; }
    .helmet-size-modal__body { padding: 1rem 1rem 1.25rem; }
    .helmet-size-modal__title { font-size: 1.05rem; }
    .helmet-size-modal__table thead th,
    .helmet-size-modal__table tbody td { padding: 0.55rem 0.65rem; }
}
