/* --- Profile Tabs --- */
.ssplug-profile-tabs {
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 12px;
    background: #fff;
    margin-bottom: 1em;
    overflow-x: auto;
}
.ssplug-profile-tabs .ssplug-tab-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 1em;
    padding: 0;
    list-style: none;
}
.ssplug-profile-tabs .ssplug-tab-nav li {
    flex: 1 1 120px;
    text-align: center;
    padding: 5px 0;
    font-size: 0.95em;
    min-height: 26px;
    line-height: 1.2;
    background: #f8f8fc;
    border-radius: 6px;
    cursor: pointer;
    margin: 0 2px 4px 2px;
    border-bottom: 2px solid transparent;
    transition: background 0.2s, color 0.2s;
}
.ssplug-profile-tabs .ssplug-tab-nav li.active {
    background: #2a6;
    color: #fff;
    border-bottom: 2px solid #0073aa;
}
.ssplug-tab-content {
    display: none;
    margin-top: 16px;
}
.ssplug-tab-content.active {
    display: block;
}
@media (max-width: 600px) {
    .ssplug-profile-tabs {
        padding: 7px;
    }
    .ssplug-profile-tabs .ssplug-tab-nav {
        flex-direction: column;
        gap: 3px;
    }
    .ssplug-profile-tabs .ssplug-tab-nav li {
        font-size: 15px;
        min-height: 22px;
        margin-bottom: 2px;
    }
    .ssplug-tab-content {
        padding: 0.5em;
    }
}

/* --- Responsive Tables --- */
.ssplug-event-log,
.form-table,
.assigned-volunteers-table,
.assigned-admins-table {
    width: 100%;
    margin: 0;
    border-radius: 0;
    border-collapse: collapse;
    font-size: 1em;
    overflow-x: auto;
    display: table;
}
.ssplug-event-log thead,
.form-table thead,
.assigned-volunteers-table thead,
.assigned-admins-table thead {
    background: #f0f7ff;
}
.ssplug-event-log th,
.form-table th,
.assigned-volunteers-table th,
.assigned-admins-table th,
.ssplug-event-log td,
.form-table td,
.assigned-volunteers-table td,
.assigned-admins-table td {
    padding: 7px 5px;
    font-size: 0.95em;
    min-width: 90px;
    word-break: break-word;
}
@media (max-width: 600px) {
    .ssplug-event-log,
    .form-table,
    .assigned-volunteers-table,
    .assigned-admins-table {
        font-size: 0.95em;
        padding: 0;
    }
    .ssplug-event-log th,
    .form-table th,
    .assigned-volunteers-table th,
    .assigned-admins-table th,
    .ssplug-event-log td,
    .form-table td,
    .assigned-volunteers-table td,
    .assigned-admins-table td {
        padding: 5px 2px;
        min-width: 70px;
    }
}

/* --- Modal Buttons: Stack vertically on mobile --- */
#edit-volunteer-modal .button,
#add-hours-modal .button,
#reassign-volunteer-modal .button {
    width: 100%;
    margin-bottom: 7px;
}
@media (min-width: 601px) {
    #edit-volunteer-modal .button,
    #add-hours-modal .button,
    #reassign-volunteer-modal .button {
        width: auto;
        margin-right: 7px;
        margin-bottom: 0;
    }
}

/* --- Button Group --- */
.ssplug-btn-group {
    display: flex;
    flex-direction: row;
    gap: 5px;
}
.ssplug-btn-group .button {
    padding: 5px 10px;
    font-size: 0.95em;
    min-height: 26px;
    line-height: 1.2;
}
@media (max-width: 600px) {
    .ssplug-btn-group {
        flex-direction: column;
        gap: 5px;
    }
    .ssplug-btn-group .button {
        width: 100%;
    }
}

/* --- Badges Section --- */
.ssplug-badges-section {
    margin: 1.5em 0;
}
.ssplug-badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1em;
}
.ssplug-badge {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    padding: 0.7em;
    text-align: center;
    transition: box-shadow 0.2s;
}
.ssplug-badge-locked {
    opacity: 0.5;
    filter: grayscale(1);
    pointer-events: none;
}
.ssplug-badge img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    margin-bottom: 0.4em;
}
.ssplug-badge-earned {
    color: #2ecc40;
    font-weight: bold;
    margin-top: 0.4em;
}
.ssplug-badge-progress {
    margin-top: 0.4em;
}
.ssplug-progress-bar {
    height: 7px;
    background: #0073aa;
    border-radius: 4px;
    margin-bottom: 0.2em;
    transition: width 0.3s;
}

/* --- Profile Photo --- */
.ssplug-profile-photo img {
    border-radius: 10%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* --- Edit Row --- */
.ssplug-edit-row {
    margin-bottom: 0.7em;
}
.ssplug-edit-row label {
    min-width: 70px;
    display: inline-block;
}
.ssplug-edit-row .ssplug-edit-btn,
.ssplug-edit-row .ssplug-save-btn {
    margin-left: 8px;
}

/* --- Modal Overlay --- */
.ssplug-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(40,60,80,0.35);
    z-index: 9998;
    display: block;
}

/* --- Modal Popup --- */
.ssplug-modal {
    position: fixed;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border: 1px solid #ccc;
    padding: 1.2em 1em 1em 1em;
    z-index: 9999;
    max-height: 80vh;
    overflow-y: auto;
    box-sizing: border-box;
    width: 90%;
    max-width: 400px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(40,60,80,0.18);
    display: block;
}
@media (max-width: 600px) {
    .ssplug-modal {
        padding: 0.7em 0.3em;
        max-width: 98vw;
    }
}

/* --- Assignment Table Styling --- */
.ssplug-assignments-table {
    margin-top: 0;
    font-size: 13.5px;
    border-collapse: collapse;
    width: 100%;
}
.ssplug-assignments-table th, .ssplug-assignments-table td {
    padding: 5px 7px !important;
    border-bottom: 1px solid #eee;
}
.dataTables_wrapper .dataTables_paginate {
    margin-top: 0.3em;
}
.dataTables_wrapper {
    margin-bottom: 0.3em;
}
.dataTables_filter { display: none; }

/* --- Assignment Table Action Buttons --- */
.ssplug-assignments-table .button,
.ssplug-assignments-table .edit-volunteer-btn,
.ssplug-assignments-table .add-hours-btn,
.ssplug-assignments-table .reassign-volunteer-btn {
    font-size: 12px;
    padding: 2px 8px;
    min-height: 22px;
    line-height: 1.1;
    border-radius: 4px;
    margin: 0 2px 0 0;
    box-sizing: border-box;
}

/* --- Table Toolbar Layout --- */
.ssplug-table-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 8px;
}
.ssplug-table-toolbar > div {
    margin: 0;
}
.ssplug-filter-toggle {
    background: #f7f7f7;
    border: #333;
    color: #333;
    font-size: 15px;
    padding: 6px 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s;
}
.ssplug-filter-toggle:hover {
    background: #e2e2e2;
}

.ssplug-filters-dropdown button {
    font-size: 13px;
    padding: 3px 14px;
    border-radius: 4px;
    margin-left: 6px;
}

@media (max-width: 600px) {
    .ssplug-table-toolbar {
        flex-direction: column;
        gap: 7px;
    }
}

/* --- Details Row --- */
.details-row-content {
    padding: 0.5em 0.7em;
    font-size: 12.5px;
    background: #f9f9f9;
    border-radius: 6px;
    margin: 0;
}
.details-row-content table {
    margin-top: 0.3em;
}
.details-row-content th, .details-row-content td {
    padding: 2px 5px;
}

.ssplug-event-log-box {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 2em;
    margin-bottom: 2em;
}

.ssplug-event-box {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 2em;
    margin-bottom: 2em;
}