@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Dashboard Container */
.custom-dashboard-wrapper {
    background-color: #000000;
    color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    font-family: 'Open Sans', Arial, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Dashboard Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background-color: #111111;
    border-bottom: 2px solid #00CEC9; /* Teal accent */
    color: #ffffff; /* Ensure white text */
}

.dashboard-header h2 {
    color: #00CEC9;
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.user-info {
    display: flex;
    align-items: center;
    color: #ffffff; /* Ensure white text */
}

.user-info img {
    border-radius: 50%;
    margin-right: 10px;
    border: 2px solid #00CEC9;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    list-style: none;
    background-color: #111111;
    margin: 0;
    padding: 0;
    color: #ffffff; /* Ensure white text */
}

.tab-item {
    flex: 1;
    text-align: center;
    padding: 15px 25px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    font-weight: 500;
}

.tab-item:hover {
    background-color: #222222;
    color: #00CEC9;
}

.tab-item.active {
    background-color: #222222;
    color: #00CEC9;
    border-bottom: 3px solid #00CEC9;
}

/* Tab Content */
.tab-content {
    padding: 30px;
    background-color: #000000;
    color: #ffffff;
}

.tab-pane {
    display: none;
    background-color: #000000;
    color: #ffffff;
}

.tab-pane.active {
    display: block;
    background-color: #000000;
    color: #ffffff;
}

/* Listing Container */
.listing-container {
    display: block;
    background-color: #000000;
    color: #ffffff;
}

.dashboard-stats {
    background-color: #1a1a1a;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    color: #ffffff;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #333333;
    color: #ffffff;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    color: #aaaaaa;
}

.stat-value {
    color: #00CEC9;
    font-weight: 600;
    font-size: 18px;
}

/* User Listings */
.user-listings {
    margin-bottom: 20px;
    background-color: #000000;
    color: #ffffff;
}

.listing-item {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
    background-color: #1a1a1a;
    border-radius: 6px;
    padding: 15px;
    transition: transform 0.2s ease;
    color: #ffffff;
}

.listing-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.listing-details {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #333333;
    color: #ffffff;
}

.listing-details h4 {
    margin: 0 0 10px 0;
    color: #ffffff;
    font-size: 18px;
    flex-basis: 100%;
}

.listing-thumbnail {
    width: 80px;
    height: 80px;
    margin-right: 15px;
    overflow: hidden;
    border-radius: 4px;
    background-color: #222222;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.listing-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-thumbnail {
    color: #888888;
    font-size: 12px;
    text-align: center;
}

.listing-meta {
    display: flex;
    flex-direction: column;
    color: #ffffff;
}

.listing-status, .listing-date {
    font-size: 14px;
    margin-bottom: 5px;
    color: #aaaaaa;
}

.listing-actions {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
    color: #ffffff;
}
/* Status Colors */
.status-publish {
    border-left: 4px solid #4CAF50;
}

.status-pending {
    border-left: 4px solid #FFC107;
}

.status-draft {
    border-left: 4px solid #9E9E9E;
}

/* Status Key/Legend */
.status-key {
    background-color: #1a1a1a;
    padding: 20px;
    border-radius: 6px;
    margin-top: 20px;
    color: #ffffff;
}

.status-key-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 14px;
    color: #ffffff;
}

.status-key-item:last-child {
    margin-bottom: 0;
}

.status-key-item .status-indicator {
    width: 4px;
    height: 30px;
    margin-right: 12px;
    border-radius: 2px;
}

.status-key-item span {
    color: #dddddd;
}

/* Action Buttons - Consistent styling across all dashboard buttons */
.action-btn {
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    margin: 0 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    min-width: 90px;
}

.view-btn {
    background-color: #333333;
    color: #ffffff;
}

.view-btn:hover {
    background-color: #444444;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.edit-btn {
    background-color: #00CEC9;
    color: #000000;
}

.edit-btn:hover {
    background-color: #00b5b1;
    color: #000000;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 206, 201, 0.3);
}

.delete-btn {
    background-color: #FF5252;
    color: #ffffff;
}

.delete-btn:hover {
    background-color: #ff3838;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(255, 82, 82, 0.3);
}

/* Save to List button styling to match other action buttons */
.action-btn.save-to-list-btn,
.listing-actions .save-to-list-btn {
    background-color: #9C27B0;
    color: #ffffff;
}

.action-btn.save-to-list-btn:hover,
.listing-actions .save-to-list-btn:hover {
    background-color: #7B1FA2;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(156, 39, 176, 0.3);
}

/* Dashboard Buttons */
.dashboard-btn {
    background-color: #00CEC9;
    color: #000000;
    border: none;
    border-radius: 4px;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 20px;
    width: 100%;
}

.dashboard-btn:hover {
    background-color: #00b5b1;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .listing-item {
        margin-bottom: 20px;
        background-color: #1a1a1a;
        color: #ffffff;
    }
    
    .listing-details h4 {
        font-size: 16px;
        color: #ffffff;
    }
    
    .listing-thumbnail {
        width: 60px;
        height: 60px;
        background-color: #222222;
        color: #ffffff;
    }
    
    .action-btn {
        padding: 6px 12px;
        font-size: 13px;
        width: 70px;
        background-color: #333333;
        color: #ffffff;
    }
}

@media (max-width: 480px) {
    .tab-navigation {
        flex-wrap: wrap;
        background-color: #111111;
        color: #ffffff;
    }
    
    .tab-item {
        flex-basis: 50%;
        text-align: center;
        padding: 12px 10px;
        background-color: #111111;
        color: #ffffff;
    }
    
    .dashboard-header {
        flex-direction: column;
        text-align: center;
        background-color: #111111;
        color: #ffffff;
    }
    
    .user-info {
        margin-top: 15px;
        color: #ffffff;
    }
    
    .listing-actions {
        flex-direction: column;
        width: 100%;
        justify-content: space-between;
        margin-top: 15px;
        background-color: #1a1a1a;
        color: #ffffff;
    }
    
    .action-btn {
        margin-right: 5px;
        margin-bottom: 0;
        background-color: #333333;
        color: #ffffff;
    }
}

/* Dashboard Pagination */
.dashboard-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    padding: 10px 0;
    background-color: #000000;
    color: #ffffff;
}

.page-numbers {
    display: flex;
    align-items: center;
    margin: 0 10px;
    background-color: #000000;
    color: #ffffff;
}

.page-number {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    margin: 0 5px;
    background-color: #1a1a1a;
    color: #ffffff;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.page-number:hover {
    background-color: #333333;
    color: #ffffff;
}

.page-number.current {
    background-color: #00CEC9;
    color: #000000;
    font-weight: 600;
}

/* Page Buttons */
.page-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 8px 16px;
    background-color: #1a1a1a;
    color: #ffffff;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.page-button:hover {
    background-color: #333333;
    color: #00CEC9;
}

/* No Listings Message */
.no-listings {
    background-color: #1a1a1a;
    padding: 30px;
    text-align: center;
    border-radius: 6px;
    color: #aaaaaa;
}

/* Notification System */
.dashboard-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 4px;
    color: #ffffff;
    font-weight: 500;
    z-index: 9999;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background-color: #333333;
}

.dashboard-notification.success {
    background-color: #00CEC9;
    color: #000000;
}

.dashboard-notification.error {
    background-color: #FF5252;
    color: #ffffff;
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(0, 206, 201, 0.3);
    border-radius: 50%;
    border-top-color: #00CEC9;
    animation: spin 1s ease-in-out infinite;
}

/* New Layout Styles for the Dashboard */
.listings-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    background-color: #000000;
    color: #ffffff;
}

.listings-main-column {
    flex: 2;
    min-width: 0; /* Ensures flex items can shrink below their minimum content size */
    background-color: #000000;
    color: #ffffff;
}

.listings-sidebar {
    flex: 1;
    min-width: 280px; /* Prevents sidebar from getting too narrow */
    background-color: #000000;
    color: #ffffff;
}

.add-listing-button {
    display: block;
    width: 100%;
    background-color: #00CEC9;
    color: #000000;
    border: none;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.add-listing-button:hover {
    background-color: #00b5b1;
}

/* Better button styling */
.action-btn.save-to-list-btn {
    background-color: #00CEC9;
    color: #000000;
}

.action-btn.save-to-list-btn:hover {
    background-color: #00b5b1;
    color: #000000;
}

/* ACF Form Styling */
.listing-form-intro {
    background-color: #1a1a1a;
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 25px;
    border-left: 4px solid #00CEC9;
}

.form-instructions {
    color: #aaaaaa;
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
}

.acf-form-success {
    background: linear-gradient(135deg, #00CEC9 0%, #00b5b1 100%);
    color: #000000;
    padding: 18px 25px;
    border-radius: 6px;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(0, 206, 201, 0.3);
}

.acf-form-error {
    background: linear-gradient(135deg, #FF5252 0%, #ff3838 100%);
    color: #ffffff;
    padding: 20px 25px;
    border-radius: 6px;
    margin-bottom: 25px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(255, 82, 82, 0.3);
}

.acf-form-error p {
    margin: 10px 0;
    color: #ffffff;
}

.acf-form-error strong {
    font-size: 18px;
    display: block;
    margin-bottom: 10px;
}

.acf-form-error ol {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 20px 20px 20px 40px;
    border-radius: 4px;
    line-height: 1.8;
}

.acf-form {
    background-color: #1a1a1a;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.acf-listing-form-wrapper {
    max-width: 100%;
}

.acf-form .acf-field {
    margin-bottom: 25px;
}

.acf-form .acf-label {
    margin-bottom: 8px;
}

.acf-form .acf-label label {
    color: #ffffff;
    font-weight: 600;
    font-size: 15px;
    display: block;
    margin-bottom: 6px;
}

.acf-form .acf-input {
    position: relative;
}

.acf-form input[type="text"],
.acf-form input[type="email"],
.acf-form input[type="url"],
.acf-form input[type="tel"],
.acf-form input[type="number"],
.acf-form textarea,
.acf-form select {
    background-color: #ffffff;
    color: #000000;
    border: 2px solid #cccccc;
    border-radius: 6px;
    padding: 12px 15px;
    width: 100%;
    font-size: 15px;
    transition: all 0.3s ease;
}

.acf-form input[type="text"]:focus,
.acf-form input[type="email"]:focus,
.acf-form input[type="url"]:focus,
.acf-form input[type="tel"]:focus,
.acf-form input[type="number"]:focus,
.acf-form textarea:focus,
.acf-form select:focus {
    border-color: #00CEC9;
    outline: none;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 206, 201, 0.1);
}

.acf-form textarea {
    min-height: 120px;
    resize: vertical;
}

.acf-form .acf-button {
    background: linear-gradient(135deg, #00CEC9 0%, #00b5b1 100%);
    color: #000000;
    border: none;
    padding: 15px 35px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 206, 201, 0.3);
    margin-top: 10px;
}

.acf-form .acf-button:hover {
    background: linear-gradient(135deg, #00b5b1 0%, #009a96 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 206, 201, 0.4);
}

.acf-form .acf-button:active {
    transform: translateY(0);
}

/* ACF Gallery Field */
.acf-form .acf-gallery {
    background-color: #222222;
    border: 2px dashed #333333;
    border-radius: 6px;
    padding: 20px;
}

.acf-form .acf-gallery .acf-gallery-main {
    background-color: #1a1a1a;
}

.acf-form .acf-gallery-attachment {
    background-color: #2a2a2a;
    border-color: #333333;
}

/* ACF WYSIWYG Editor */
.acf-form .wp-editor-wrap {
    background-color: #222222;
    border: 2px solid #333333;
    border-radius: 6px;
    overflow: hidden;
}

.acf-form .wp-editor-tools {
    background-color: #1a1a1a;
    border-bottom: 1px solid #333333;
}

.acf-form .wp-editor-container textarea {
    background-color: #ffffff;
    color: #000000;
}

/* Description text under fields */
.acf-form .description {
    color: #888888;
    font-size: 13px;
    font-style: italic;
    margin-top: 5px;
}

/* Required field indicator */
.acf-form .acf-required {
    color: #FF5252;
    font-weight: bold;
}

/* Hide author field in ACF forms (auto-populated) */
.acf-form #acf-post_author,
.acf-form .acf-field-post-author,
.acf-form .acf-field[data-name="post_author"],
.acf-form .acf-field-post-author,
.acf-form div[data-name="post_author"],
.acf-form .acf-field[data-key="post_author"],
#acf-post_author,
div.acf-field.acf-field-select[data-name="post_author"] {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}
/* Post Type Badges */
.post-type-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 12px;
    margin-left: 8px;
    vertical-align: middle;
    letter-spacing: 0.5px;
}

.badge-listing {
    background-color: #00CEC9;
    color: #000000;
}

.badge-jobs {
    background-color: #6C5CE7;
    color: #ffffff;
}

.badge-events {
    background-color: #FDCB6E;
    color: #000000;
}

/* Default badge for unspecified post types */
.post-type-badge:not([class*="badge-"]) {
    background-color: #555555;
    color: #ffffff;
}
