/* User Dashboard Styles */
.user-listings-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.dashboard-header h2 {
    margin: 0;
    font-size: 24px;
    color: #2d3748;
}

.add-new-listing-btn {
    background: #2b6cb0;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    transition: background 0.3s;
}

.add-new-listing-btn:hover {
    background: #2c5282;
    color: white;
}

/* Dashboard Notices */
.dashboard-notice {
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    animation: slideDown 0.3s ease;
}

.notice-success {
    background: #c6f6d5;
    color: #22543d;
    border-left: 4px solid #38a169;
}

.notice-error {
    background: #fed7d7;
    color: #742a2a;
    border-left: 4px solid #e53e3e;
}

/* Listing Cards */
.listings-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.listing-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.listing-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.listing-card-header {
    display: flex;
    padding: 20px;
    gap: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.listing-thumbnail {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}

.listing-thumbnail.placeholder {
    background: #edf2f7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    border-radius: 8px;
}

.listing-info {
    flex: 1;
}

.listing-info h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    color: #2d3748;
}

.listing-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.listing-type {
    background: #ebf8ff;
    color: #2b6cb0;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.listing-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-publish {
    background: #c6f6d5;
    color: #22543d;
}

.status-pending {
    background: #fefcbf;
    color: #744210;
}

.status-draft {
    background: #e2e8f0;
    color: #4a5568;
}

.listing-location,
.listing-whatsapp {
    font-size: 14px;
    color: #718096;
    margin-top: 4px;
}

/* Listing Stats */
.listing-stats {
    display: flex;
    gap: 30px;
    padding: 15px 20px;
    background: #f7fafc;
    border-bottom: 1px solid #e2e8f0;
}

.stat {
    display: flex;
    gap: 8px;
    font-size: 14px;
}

.stat-label {
    color: #718096;
}

.stat-value {
    font-weight: 600;
    color: #2d3748;
}

/* Listing Actions */
.listing-actions {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
}

.listing-actions .button {
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    border: none;
    transition: all 0.2s;
}

.listing-actions .edit-listing {
    background: #222F52;
    color: white;
}

.listing-actions .edit-listing:hover {
    background: #2c5282;
}

.listing-actions .view-promotions {
    background: #A88757;
    color: white;
}

.listing-actions .view-promotions:hover {
    background: #A88757;
}

.listing-actions .delete-listing {
    background: #333333;
    color: white;
}

.listing-actions .delete-listing:hover {
    background: #000000;
}

/* No Listings State */
.no-listings {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
}

.no-listings p {
    font-size: 18px;
    color: #718096;
    margin-bottom: 20px;
}

.no-listings .button {
    background: #2b6cb0;
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    display: inline-block;
}

/* Modal Styles */
.dashboard-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal-container {
    position: relative;
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1;
    animation: modalSlideUp 0.3s ease;
}

.promotions-modal-container {
    max-width: 900px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #a0aec0;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: #4a5568;
}

.modal-body {
    padding: 20px;
}

/* Form Styles in Modal */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2d3748;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2b6cb0;
    box-shadow: 0 0 0 3px rgba(43,108,176,0.1);
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-group.half {
    flex: 1;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.button-primary {
    background: #2b6cb0;
    color: white;
}

.button-primary:hover {
    background: #2c5282;
}

.button-small {
    padding: 5px 10px;
    font-size: 12px;
}

/* Promotions Table */
.promotions-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.promotions-table th,
.promotions-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.promotions-table th {
    background: #f7fafc;
    font-weight: 600;
    color: #4a5568;
}

.promotion-category-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: capitalize;
}

.promotion-category-badge.rates {
    background: #bee3f8;
    color: #2c5282;
}

.promotion-category-badge.promotion {
    background: #fefcbf;
    color: #744210;
}

.promotion-category-badge.event {
    background: #e9d8fd;
    color: #553c9a;
}

.promotion-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-published {
    background: #c6f6d5;
    color: #22543d;
}

.status-pending {
    background: #fefcbf;
    color: #744210;
}

.delete-promotion {
    background: #e53e3e;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.delete-promotion:hover {
    background: #c53030;
}

/* Add Promotion Section */
.add-promotion-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e2e8f0;
}

.add-promotion-section h4 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #2d3748;
}

.char-count {
    font-size: 12px;
    color: #718096;
    margin-top: 4px;
}

.char-count .over-limit {
    color: #e53e3e;
}

#quick-promotion-message {
    margin-top: 15px;
}

#quick-promotion-message .success-message {
    padding: 10px;
    background: #c6f6d5;
    color: #22543d;
    border-radius: 6px;
}

#quick-promotion-message .error-message {
    padding: 10px;
    background: #fed7d7;
    color: #742a2a;
    border-radius: 6px;
}

.no-promotions {
    text-align: center;
    padding: 40px;
    color: #718096;
}

/* Login Required */
.user-dashboard-login-required {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
}

.user-dashboard-login-required p {
    font-size: 18px;
    color: #718096;
    margin-bottom: 20px;
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .listing-card-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .listing-stats {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    
    .listing-actions {
        flex-direction: column;
    }
    
    .listing-actions .button {
        width: 100%;
        text-align: center;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .promotions-table {
        display: block;
        overflow-x: auto;
    }
    
    .dashboard-header {
        flex-direction: column;
        text-align: center;
    }
}