.api-event-dashboard {
    margin: 40px auto;
}

.dashboard-container {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.modules-tabs-nav {
    position: sticky;
    top: 20px;
}

.module-tab-btn {
    transition: all 0.3s ease;
}

.module-tab-btn:hover {
    background-color: #4CAF50 !important;
    color: white !important;
    border-color: #4CAF50 !important;
}

.module-tab-btn.active {
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.module-tab-content {
    animation: fadeIn 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.module-content-data
{
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Custom scrollbar */
.modules-list::-webkit-scrollbar {
    width: 6px;
}

.modules-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.modules-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.modules-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.content-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 14px;
}

.content-table th {
    background-color: #4CAF50;
    color: white;
    padding: 12px;
    text-align: left;
    border: 1px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 10;
}

.content-table td {
    padding: 10px;
    border: 1px solid #ddd;
    vertical-align: top;
}

.content-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.content-table tr:hover {
    background-color: #f5f5f5;
}

.pagination {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
}

.pagination button {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 4px;
    min-width: 40px;
}

.pagination button.active {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.pagination button:hover:not(.active) {
    background: #f5f5f5;
}

.no-content {
    padding: 40px;
    text-align: center;
    background: #f8f8f8;
    border-radius: 8px;
    color: #666;
}

.content-table-wrapper {
    overflow-x: auto;
    margin-top: 20px;
    max-height: 500px;
    overflow-y: auto;
}

.json-view {
    background: #f5f5f5;
    padding: 10px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.form-field-value {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.form-field-value.expanded {
    white-space: normal;
    max-width: none;
}

.toggle-expand {
    color: #2196F3;
    cursor: pointer;
    font-size: 12px;
    margin-left: 5px;
}

.data-type-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    margin-right: 5px;
}

.badge-string { background: #E3F2FD; color: #1976D2; }
.badge-number { background: #E8F5E9; color: #388E3C; }
.badge-boolean { background: #FFF3E0; color: #F57C00; }
.badge-array { background: #F3E5F5; color: #7B1FA2; }
.badge-object { background: #FFEBEE; color: #D32F2F; }
.badge-null { background: #ECEFF1; color: #607D8B; }

/* Accordion animations */
.accordion-content {
    transition: max-height 0.3s ease-out;
}

/* Better hover effects */
.accordion-header:hover {
    background: #e9ecef !important;
}

.edit-form-accordion .accordion-header:hover {
    background: #2196F3 !important;
}

/* Field styling */
.detail-field:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    transition: all 0.2s ease;
}

/* Button hover effects */
/*button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}*/

/* Responsive design */
@media (max-width: 768px) {
    .modules-tabs-wrapper {
        flex-direction: column !important;
    }
    
    .modules-tabs-nav {
        border-right: none !important;
        border-bottom: 1px solid #e0e0e0;
        padding-right: 0 !important;
        padding-bottom: 20px;
        flex: none !important;
    }
    
    .detail-field {
        grid-column: 1 / -1 !important;
    }
}





.api-event-dashboard .label-value-list {
    display: grid;
    grid-template-columns: 1fr 1fr; /* two equal columns */
    column-gap: 30px;
}

.api-event-dashboard .field-row {
    display: flex;
    align-items: flex-start;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.api-event-dashboard .field-label {
    flex: 0 0 160px; /* label width */
    font-weight: 600;
    color: #333;
    padding-right: 12px;
    font-size: 14px;
}

.api-event-dashboard .field-value {
    flex: 1;
    color: #555;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
}


@media (max-width: 767px)
{
    .api-event-dashboard .label-value-list
    {
        grid-template-columns: 1fr !important;
    }
    .header-actions button span
    {
        display: none;
    }
    .accordion-header
    {
        padding: 5px 15px !important;
    }
    .accordion-header h3
    {
        font-size: 14px !important;
    }
    .accordion-content
    {
        padding: 16px !important;
    }
    .api-event-dashboard .field-row
    {
        margin-bottom: 8px !important;
        padding-bottom: 8px !important;
    }
    .module-search-container input
    {
        padding: 5px 15px 5px 40px !important;
    }
    .module-search-container button
    {
        padding: 5px 10px !important;
    }
    .pagination button
    {
        padding: 5px 10px !important;
        font-size: 12px !important;
    }
} 



/* Alternative: CSS Grid approach for mobile */
@media (max-width: 991px) {
    .api-event-dashboard .modules-tabs-wrapper {
        display: grid !important;
        grid-template-rows: auto 1fr !important;
        gap: 15px !important;
    }
    
    .api-event-dashboard .modules-tabs-nav {
        grid-row: 1;
        overflow: scroll;
    }
    
    .api-event-dashboard .modules-list {
        display: grid !important;
        grid-auto-flow: column !important;
        gap: 10px !important;
        overflow-x: auto !important;
        overscroll-behavior-x: contain !important;
        scroll-snap-type: x mandatory !important;
    }
    
    .api-event-dashboard .module-tab-btn {
        scroll-snap-align: start !important;
        min-width: auto !important;
        width: max-content !important;
        padding: 8px 12px !important;
    }
    .pagination
    {
        margin-bottom: 10px;
    }
    .module-search-container
    {
        justify-content: flex-end !important;
    }
}

@keyframes pulse {
    0% { opacity: 0.8; }
    50% { opacity: 1; }
    100% { opacity: 0.8; }
}

.progress-bar {
    transition: width 0.3s ease-out, background-color 0.3s ease-out;
    height: 20px;
    border-radius: 4px;
}

.progress-bar.uploading {
    background-color: #2196F3;
}

.progress-bar.processing {
    background-color: #FF9800;
    animation: pulse 1.5s infinite;
}

.progress-bar.complete {
    background-color: #4CAF50;
}

.progress-bar.error {
    background-color: #f44336;
}



@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}


@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.edit-form-container {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.existing-file-preview {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px dashed #dee2e6;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 15px;
}




.api-event-dashboard .switch .switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    cursor: pointer;
}

.api-event-dashboard .switch .switch input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 1;
    cursor: pointer;
}

.api-event-dashboard .switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #f44336;
    transition: .4s;
    border-radius: 34px;
}

.api-event-dashboard .switch .slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.api-event-dashboard .switch input:checked + .slider {
    background-color: #4CAF50;
}

.api-event-dashboard .switch input:checked + .slider:before {
    transform: translateX(26px);
}


/* Image Modal Styles */
.event-admin-image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.event-admin-image-modal.active {
    display: flex;
}

.event-admin-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.event-admin-modal-image-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 100%;
    max-height: 65vh;
}

.event-admin-modal-image {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
}

.event-admin-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 24px;
    padding: 5px 10px;
    cursor: pointer;
    transition: background 0.3s;
    border-radius: 4px;
}

.event-admin-modal-nav:hover {
    background: rgba(0, 0, 0, 0.8);
}

.event-admin-modal-prev {
    left: 20px;
}

.event-admin-modal-next {
    right: 20px;
}

.event-admin-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 28px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    z-index: 9999;
}

.event-admin-modal-close:hover {
    background: rgba(255, 0, 0, 0.7);
}

.event-admin-modal-tools {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 8px;
}

.event-admin-modal-tool-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    transition: background 0.3s;
}

.event-admin-modal-tool-btn:hover {
    background: #45a049;
}

.event-admin-image-counter {
    color: white;
    font-size: 16px;
    margin-top: 10px;
    text-align: center;
}

.event-admin-thumbnail-container {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.event-admin-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.3s;
}

.event-admin-thumbnail.active {
    border-color: #4CAF50;
}

.event-admin-thumbnail:hover {
    border-color: #2196F3;
}

.single-image-container {
    cursor: pointer;
    transition: transform 0.2s;
}

.form-fields-container
{
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 30px;
}
.inline-edit-form .form-control
{
    height: 40px;
    padding: 6px 12px;
    margin-bottom: 7px;
}
.inline-edit-form .edit-row label
{
    margin-bottom: 7px;
}

.edit-rows-container
{
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 30px;
}

@media (max-width: 767px) 
{
    .form-fields-container, .edit-rows-container, .inline-edit-form .radio-group, .form-fields-container .radio-group
    {
        grid-template-columns: 1fr !important;
    }
}    


.dots-loader {
    display: flex;
    gap: 6px;
}

.dots-loader::before,
.dots-loader::after,
.dots-loader span {
    content: '';
    width: 10px;
    height: 10px;
    background: #3498db;
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite both;
}

.dots-loader::before {
    animation-delay: -0.32s;
}

.dots-loader span {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}


.header-actions.disabled {
    position: relative;
}

.header-actions.disabled::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
    z-index: 10;
}





/* Edit mode indicator */
.edit-mode-active .accordion-header {
    opacity: 0.6;
    cursor: not-allowed !important;
}

.edit-mode-active .accordion-header:hover {
    background: #f8f9fa !important;
}

.accordion-item.editing {
    border: 2px solid #4CAF50 !important;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}


.select-search-wrapper {
    position: relative;
}

.select-search-input {
    width: 100%;
    padding: 10px 15px 10px 35px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    margin-bottom: 5px;
}

.select-search-wrapper svg {
    position: absolute;
    left: 12px;
    top: 12px;
    width: 16px;
    height: 16px;
    fill: #666;
    z-index: 1;
}

.select-search-loading {
    position: absolute;
    right: 35px;
    top: 12px;
}

.select-search-wrapper select {
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
}
.hide-other-records {
    display: none !important;
}




/*only for hiding button for Family Members*/


#module-content-1 #content-data-1 #load-fields-btn-1, #module-content-1 #content-data-1 .header-actions
{
    display: none !important;
}