/* BBLCA Regatta sponsor component */

/* Compact BBLCA Regatta sponsor strip */
.regatta-sponsors {
    clear: both;
    margin: 18px 10px 24px;
    padding: 0;
    border: 1px solid #c8d3bb;
    background: #ffffff;
    box-sizing: border-box;
}

.regatta-sponsors__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 14px;
    background: #557a2b;
    color: #ffffff;
}

.regatta-sponsors__header h2 {
    margin: 0;
    color: #ffffff;
    font-size: 1.25em;
}

.regatta-sponsors__header p {
    margin: 0;
    font-size: 0.88em;
    text-align: right;
}

.sponsor-strip {
    display: grid;
    grid-template-columns: repeat(6, minmax(110px, 1fr));
    gap: 8px;
    padding: 10px;
    box-sizing: border-box;
}

.sponsor-tile {
    position: relative;
    min-width: 0;
    border: 1px solid #d7ddd0;
    background: #ffffff;
    box-sizing: border-box;
    transition: border-color 160ms ease, box-shadow 160ms ease,
        transform 160ms ease;
}

.sponsor-tile:hover,
.sponsor-tile:focus-within {
    border-color: #557a2b;
    box-shadow: 0 3px 12px rgba(45, 70, 27, 0.16);
    transform: translateY(-1px);
}

.sponsor-logo-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 94px;
    padding: 8px;
    overflow: hidden;
    box-sizing: border-box;
    text-decoration: none;
}

.sponsor-logo-link img {
    display: block;
    max-width: 100%;
    max-height: 62px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.sponsor-logo-link::after {
    content: attr(data-name);
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 5px 26px 5px 6px;
    background: rgba(53, 80, 30, 0.94);
    color: #ffffff;
    font-size: 0.72em;
    font-weight: bold;
    line-height: 1.15;
    text-align: center;
    white-space: normal;
    overflow: hidden;
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 150ms ease, transform 150ms ease;
}

.sponsor-logo-link:hover::after,
.sponsor-logo-link:focus::after {
    opacity: 1;
    transform: translateY(0);
}

.sponsor-more {
    position: absolute;
    right: 4px;
    bottom: 3px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1px solid #557a2b;
    border-radius: 50%;
    background: #ffffff;
    color: #35501e;
    font: bold 18px/1 Arial, sans-serif;
    cursor: pointer;
}

.sponsor-more:hover,
.sponsor-more:focus,
.sponsor-more[aria-expanded="true"] {
    background: #557a2b;
    color: #ffffff;
    outline: none;
}

.sponsor-details {
    position: relative;
    margin: 0 10px 10px;
    padding: 12px 42px 12px 14px;
    border-top: 3px solid #557a2b;
    background: #f4f7f1;
    box-sizing: border-box;
}

.sponsor-details[hidden] {
    display: none;
}

.sponsor-details h3 {
    margin: 0 0 7px;
    color: #35501e;
    font-size: 1.05em;
}

.sponsor-details__meta {
    margin: -2px 0 9px;
    color: #555555;
    font-size: 0.88em;
}

.sponsor-contact-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sponsor-contact-list li {
    margin: 0;
    min-width: 0;
}

.sponsor-contact-list a,
.sponsor-contact-list span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    overflow-wrap: anywhere;
}

.sponsor-contact-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #557a2b;
    color: #ffffff;
    font: bold 14px/1 Arial, sans-serif;
}

.sponsor-details__close {
    position: absolute;
    top: 9px;
    right: 10px;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #35501e;
    font: 24px/1 Arial, sans-serif;
    cursor: pointer;
}

.sponsor-personal-thanks {
    margin: 0;
    padding: 0 12px 10px;
    color: #555555;
    font-size: 0.82em;
    text-align: center;
}

.regatta-sponsors .visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (max-width: 900px) {
    .sponsor-strip {
        grid-template-columns: repeat(3, minmax(120px, 1fr));
    }
}

@media (max-width: 600px) {
    .regatta-sponsors {
        margin-left: 0;
        margin-right: 0;
    }

    .regatta-sponsors__header {
        display: block;
    }

    .regatta-sponsors__header p {
        margin-top: 3px;
        text-align: left;
    }

    .sponsor-strip {
        display: flex;
        grid-template-columns: none;
        gap: 8px;
        overflow-x: auto;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }

    .sponsor-tile {
        flex: 0 0 145px;
        scroll-snap-align: start;
    }

    .sponsor-details {
        margin-left: 8px;
        margin-right: 8px;
    }

    .sponsor-contact-list {
        display: block;
    }

    .sponsor-contact-list li + li {
        margin-top: 7px;
    }
}
