/* Admin forms — responsive layout, lightbox */

.admin-form {
    max-width: 960px;
    margin: 0 auto;
    padding: 10px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
}

.admin-form a.admin-back-link {
    display: inline-block;
    margin-bottom: 12px;
}

/* Section */
.admin-form-section {
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-bottom: 16px;
    padding: 0;
}

.admin-form-section-title {
    background: #f5f5f5;
    border-bottom: 2px solid #4a90d9;
    padding: 8px 14px;
    font-weight: bold;
    font-size: 15px;
    color: #333;
    cursor: pointer;
    user-select: none;
    border-radius: 6px 6px 0 0;
}

.admin-form-section-title::after {
    content: '';
    display: inline-block;
    float: right;
    width: 8px;
    height: 8px;
    border-right: 2px solid #888;
    border-bottom: 2px solid #888;
    transform: rotate(45deg);
    margin-top: 3px;
    transition: transform 0.2s;
}

.admin-form-section.collapsed .admin-form-section-title::after {
    transform: rotate(-135deg);
    margin-top: 6px;
}

.admin-form-section-title:hover {
    background: #eaeaea;
}

.admin-form-section-body {
    overflow: visible;
    transition: max-height 0.3s ease;
}

.admin-form-section.collapsed .admin-form-section-body {
    max-height: 0 !important;
    overflow: hidden;
}

.admin-form-section.collapsed .admin-form-section-title {
    border-bottom-color: transparent;
}

/* Row: label + value */
.admin-form-row {
    display: flex;
    align-items: baseline;
    padding: 7px 14px;
    border-bottom: 1px solid #eee;
}

.admin-form-row:last-child {
    border-bottom: none;
}

.admin-form-label {
    flex: 0 0 220px;
    font-weight: 600;
    color: #444;
    padding-right: 10px;
    box-sizing: border-box;
}

.admin-form-value {
    flex: 1;
    min-width: 0;
}

.admin-form-value input[type="text"],
.admin-form-value textarea,
.admin-form-value select {
    max-width: 100%;
    box-sizing: border-box;
}

.admin-form-value input[type="text"] {
    width: 100%;
}

.admin-form-value textarea {
    width: 100%;
}

/* Thumbnails */
.admin-thumb {
    max-width: 120px;
    max-height: 120px;
    object-fit: contain;
    border: 1px solid #ddd;
    border-radius: 4px;
    vertical-align: middle;
}

.admin-thumb-container {
    display: inline-block;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 6px;
    padding: 2px;
    transition: border-color 0.2s;
    vertical-align: middle;
    margin-right: 8px;
}

.admin-thumb-container:hover {
    border-color: #4a90d9;
}

/* Lightbox overlay */
.admin-lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.admin-lightbox-overlay img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.admin-lightbox-close {
    position: fixed;
    top: 16px;
    right: 24px;
    color: #fff;
    font-size: 36px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    line-height: 1;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.8);
}

.admin-lightbox-close:hover {
    color: #ddd;
}

/* Inline checkbox label */
.admin-form-row .admin-checkbox-inline {
    margin-left: 16px;
}

/* Submit row */
.admin-form-submit {
    padding: 12px 14px;
    text-align: left;
}

.admin-form-submit input[type="submit"] {
    padding: 8px 32px;
    font-size: 15px;
    cursor: pointer;
}

/* Organizers: side-by-side selects */
.admin-org-selects {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

/* Placeholder legend */
.admin-placeholder-legend {
    padding: 8px 14px;
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}

/* ===== Admin table ===== */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.admin-table th {
    background: #f5f5f5;
    border-bottom: 2px solid #4a90d9;
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

.admin-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.admin-table tbody tr:hover {
    background: #f0f7ff;
}

.admin-table .nameCol {
    font-weight: 500;
}

/* Table toolbar: filter + new event */
.admin-table-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.admin-table-toolbar .admin-table-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.admin-table-toolbar label {
    font-size: 14px;
    color: #555;
}

.admin-table-toolbar input[type="text"] {
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    width: 180px;
}

.admin-table-toolbar .admin-table-hint {
    font-size: 12px;
    color: #999;
}

.admin-table-toolbar .admin-new-btn {
    margin-left: auto;
    display: inline-block;
    padding: 6px 16px;
    background: #4a90d9;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
}

.admin-table-toolbar .admin-new-btn:hover {
    background: #3a7bc8;
}

/* ===== Dropdown ===== */
.admin-dropdown {
    position: relative;
    display: inline-block;
}

.admin-dropdown-btn {
    background: #4a90d9;
    color: #fff;
    border: none;
    padding: 5px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
}

.admin-dropdown-btn:hover {
    background: #3a7bc8;
}

.admin-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    min-width: 210px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    padding: 4px 0;
    margin-top: 2px;
}

.admin-dropdown.open .admin-dropdown-menu {
    display: block;
}

.admin-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    color: #333;
    text-decoration: none;
    font-size: 13px;
    white-space: nowrap;
}

.admin-dropdown-menu a:hover {
    background: #f0f7ff;
}

.admin-dropdown-divider {
    height: 1px;
    background: #eee;
    margin: 4px 0;
}

.admin-dropdown-menu a.admin-dropdown-danger {
    color: #d32f2f;
}

.admin-dropdown-menu a.admin-dropdown-danger:hover {
    background: #fff0f0;
}

/* Bulk actions toolbar (member list) */
.admin-bulk-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.admin-bulk-toolbar select {
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Hide columns on small screens */
.admin-table-hide-sm {
    /* visible by default */
}

/* Responsive — tablet */
@media (max-width: 768px) {
    .admin-form-row {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-form-label {
        flex: none;
        margin-bottom: 4px;
    }

    .admin-org-selects {
        flex-direction: column;
    }

    .admin-table-hide-sm {
        display: none;
    }

    .admin-table-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-table-toolbar .admin-new-btn {
        margin-left: 0;
    }
}

/* Responsive — mobile */
@media (max-width: 480px) {
    .admin-form {
        padding: 6px;
    }

    .admin-form-section-title {
        padding: 6px 10px;
        font-size: 14px;
    }

    .admin-form-row {
        padding: 5px 10px;
    }

    .admin-thumb {
        max-width: 80px;
        max-height: 80px;
    }
}
