/* ======================== Frontend Styles ======================== */

/* Accordion Container */
.rrm-accordion-container {
    max-width: 900px;
    margin: 20px auto;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    background-color: #fff;
}

/* Accordion Item */
.rrm-accordion-item {
    border-bottom: 1px solid #ddd;
}

.rrm-accordion-item:last-child {
    border-bottom: none;
}

/* Accordion Header */
.rrm-accordion-header {
    background-color: #0073aa;
    color: #fff;
    padding: 15px;
    cursor: pointer;
    position: relative;
    transition: background-color 0.3s ease;
}

.rrm-accordion-header h3 {
    margin: 0;
    font-size: 18px;
}

.rrm-accordion-header::after {
    content: '\25BC'; /* Down arrow */
    position: absolute;
    right: 20px;
    font-size: 16px;
    transition: transform 0.3s ease;
}

.rrm-accordion-item.active .rrm-accordion-header::after {
    transform: rotate(180deg);
}

/* Accordion Content */
.rrm-accordion-content {
    display: none;
    padding: 15px;
    background-color: #f9f9f9;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.rrm-accordion-content h4 {
    margin-top: 0;
    font-size: 16px;
    color: #0073aa;
}

.rrm-accordion-content ul {
    list-style: disc;
    margin-left: 20px;
}

.rrm-accordion-content ul li {
    margin-bottom: 8px;
}

.rrm-accordion-content ul li a {
    color: #0073aa;
    text-decoration: none;
}

.rrm-accordion-content ul li a:hover {
    text-decoration: underline;
}

/* Active Accordion Header */
.rrm-accordion-item.active .rrm-accordion-header {
    background-color: #005177;
}

/* Responsive Adjustments */
@media (max-width: 600px) {
    .rrm-accordion-header h3 {
        font-size: 16px;
    }

    .rrm-accordion-content h4 {
        font-size: 14px;
    }
}

/* Tab Navigation */
.rrm-tab-container {
    max-width: 900px;
    margin: 20px auto;
    font-family: Arial, sans-serif;
}

.rrm-tab-navigation {
    display: flex;
    overflow-x: auto;
    background: #f4f4f4;
    padding: 10px;
    border-bottom: 2px solid #ddd;
}

.rrm-tab {
    padding: 10px 20px;
    margin-right: 5px;
    background: #fff;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: background-color 0.3s;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.rrm-tab:hover {
    background-color: #eaeaea;
}

.rrm-tab.active {
    background-color: #0073aa;
    color: #fff;
    border-color: #ddd #ddd #fff #ddd;
    font-weight: bold;
}

.rrm-tab-content {
    background: #fff;
    border: 1px solid #ddd;
    padding: 20px;
}

.rrm-year-content {
    display: none;
}

.rrm-year-content.active {
    display: block;
}

/* Class Section */
.rrm-class-section {
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

/* Class Toggle Button */
.rrm-class-toggle {
    background: #f4f4f4;
    border: none;
    padding: 10px 15px;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rrm-class-toggle:hover {
    background-color: #eaeaea;
}

.rrm-class-toggle[aria-expanded="true"] {
    background-color: #0073aa;
    color: #fff;
}

.rrm-class-toggle .arrow-icon {
    font-size: 18px;
    transition: transform 0.3s ease;
    color: inherit;
}

.rrm-class-toggle[aria-expanded="true"] .arrow-icon {
    transform: rotate(90deg);
}

/* Class Content */
.rrm-class-content {
    display: none;
    padding: 15px;
    background: #fff;
}

.rrm-class-content[aria-hidden="false"] {
    display: block;
}

/* Table Styling */
.rrm-regatta-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 16px;
}

.rrm-regatta-table th,
.rrm-regatta-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

.rrm-regatta-table th {
    background: #f4f4f4;
    font-weight: bold;
}

.rrm-regatta-table tr:hover {
    background: #f9f9f9;
}

/* Link Styling */
.link-action {
    display: inline-flex; /* Changed from inline-flex to flex to ensure proper alignment */
    align-items: center;
    text-decoration: none;
    color: #0073aa;
    font-weight: bold;
    margin-right: 10px;
    transition: color 0.3s ease;
}

.link-action svg {
    margin-right: 8px;
    fill: currentColor; /* Inherits color from the parent link */
    transition: fill 0.3s ease;
}

.link-action:hover {
    color: #005f8d;
}

.link-action:hover svg {
    fill: #005f8d;
}

.pdf-link {
    color: #f54e42;
}

.pdf-link:hover {
    color: #d94334;
}

.pdf-link svg {
    fill: currentColor;
}



/* Accessibility Improvements */
.rrm-tab:focus,
.rrm-class-toggle:focus {
    outline: 2px solid #0073aa;
}

/* Responsive Adjustments */
@media (max-width: 600px) {
    .rrm-tab {
        padding: 8px 12px;
        font-size: 14px;
        flex: 1;
        text-align: center;
    }

    .rrm-tab-navigation {
        flex-wrap: wrap;
    }

    .rrm-class-toggle {
        font-size: 14px;
        padding: 10px;
    }

    .rrm-class-toggle .arrow-icon {
        font-size: 16px;
    }

    .rrm-regatta-table {
        font-size: 14px;
    }
}

/* Arrow Icon Rotation */
.arrow-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

.arrow-icon.rotated {
    transform: rotate(90deg);
}

.rrm-event-name {
    text-align: center;
}
