/* File: public/assets/css/public.css */

/* PostNow Core Public Styles */
.postnow-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.postnow-grid {
    display: grid;
    gap: 20px;
    margin: 20px 0;
}

.postnow-columns-2 { grid-template-columns: repeat(2, 1fr); }
.postnow-columns-3 { grid-template-columns: repeat(3, 1fr); }
.postnow-columns-4 { grid-template-columns: repeat(4, 1fr); }
.postnow-columns-5 { grid-template-columns: repeat(5, 1fr); }
.postnow-columns-6 { grid-template-columns: repeat(6, 1fr); }

/* Listing Cards */
.postnow-listing-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.postnow-listing-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.postnow-listing-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.postnow-listing-card:hover .postnow-listing-image img {
    transform: scale(1.05);
}

.postnow-listing-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 5px;
}

.postnow-featured-badge {
    background: #ffb900;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
}

.postnow-verified-badge {
    background: #10b981;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
}

.postnow-listing-content {
    padding: 15px;
}

.postnow-listing-title {
    margin: 0 0 10px 0;
    font-size: 1.1em;
    line-height: 1.3;
}

.postnow-listing-title a {
    color: #1f2937;
    text-decoration: none;
}

.postnow-listing-title a:hover {
    color: #3b82f6;
}

.postnow-listing-price {
    font-size: 1.3em;
    font-weight: bold;
    color: #10b981;
    margin: 0 0 8px 0;
}

.postnow-listing-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0 0 0;
    padding-top: 10px;
    border-top: 1px solid #f3f4f6;
    font-size: 0.9em;
    color: #6b7280;
}

.postnow-listing-location {
    display: flex;
    align-items: center;
    gap: 5px;
}

.postnow-listing-views {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Search Form */
.postnow-search-form {
    background: #f8fafc;
    padding: 30px;
    border-radius: 8px;
    margin: 20px 0;
}

.postnow-search-fields {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 10px;
    align-items: end;
}

.postnow-search-input,
.postnow-category-select,
.postnow-region-select {
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1em;
    width: 100%;
}

.postnow-search-button {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.3s ease;
}

.postnow-search-button:hover {
    background: #2563eb;
}

/* Categories Grid */
.postnow-categories-grid {
    display: grid;
    gap: 20px;
    margin: 30px 0;
}

.postnow-category-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.postnow-category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #3b82f6;
}

.postnow-category-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.postnow-category-icon {
    font-size: 2em;
    display: block;
    margin-bottom: 10px;
}

.postnow-category-name {
    margin: 0 0 8px 0;
    font-size: 1.1em;
    color: #1f2937;
}

.postnow-category-count {
    color: #6b7280;
    font-size: 0.9em;
}

/* Status Badges */
.postnow-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
}

.status-published { background: #d1fae5; color: #065f46; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-draft { background: #e5e7eb; color: #374151; }
.status-expired { background: #fee2e2; color: #991b1b; }
.status-rejected { background: #fecaca; color: #dc2626; }

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

.postnow-dashboard-header {
    background: white;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.postnow-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.postnow-stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.postnow-stat-number {
    font-size: 2em;
    font-weight: bold;
    color: #3b82f6;
    display: block;
}

.postnow-stat-label {
    color: #6b7280;
    font-size: 0.9em;
}

.postnow-dashboard-tabs {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.postnow-tab-nav {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
}

.postnow-tab-link {
    padding: 15px 20px;
    text-decoration: none;
    color: #6b7280;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.postnow-tab-link.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
    background: white;
}

.postnow-tab-content {
    padding: 20px;
}

.postnow-tab-pane {
    display: none;
}

.postnow-tab-pane.active {
    display: block;
}

/* Forms */
.postnow-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.postnow-form-group {
    margin-bottom: 20px;
}

.postnow-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
}

.postnow-form-input,
.postnow-form-select,
.postnow-form-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.postnow-form-input:focus,
.postnow-form-select:focus,
.postnow-form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

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

.postnow-form-submit {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.3s ease;
}

.postnow-form-submit:hover {
    background: #2563eb;
}

/* Loading States */
.postnow-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f4f6;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: postnow-spin 1s linear infinite;
}

@keyframes postnow-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.postnow-load-more {
    text-align: center;
    margin: 30px 0;
}

.postnow-load-more-button {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease;
}

.postnow-load-more-button:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.postnow-load-more-button:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

/* Alert Messages */
.postnow-alert {
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
    border-left: 4px solid;
}

.postnow-alert-success {
    background: #d1fae5;
    border-color: #10b981;
    color: #065f46;
}

.postnow-alert-error {
    background: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
}

.postnow-alert-warning {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}

.postnow-alert-info {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1e40af;
}

/* Pagination */
.postnow-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 30px 0;
}

.postnow-pagination-link {
    padding: 8px 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    text-decoration: none;
    color: #374151;
    transition: all 0.3s ease;
}

.postnow-pagination-link:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.postnow-pagination-link.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .postnow-container {
        padding: 0 15px;
    }
    
    .postnow-grid {
        grid-template-columns: 1fr;
    }
    
    .postnow-search-fields {
        grid-template-columns: 1fr;
    }
    
    .postnow-dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .postnow-tab-nav {
        flex-direction: column;
    }
    
    .postnow-categories-grid.postnow-columns-4,
    .postnow-categories-grid.postnow-columns-5,
    .postnow-categories-grid.postnow-columns-6 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .postnow-categories-grid.postnow-columns-4,
    .postnow-categories-grid.postnow-columns-5,
    .postnow-categories-grid.postnow-columns-6 {
        grid-template-columns: 1fr;
    }
    
    .postnow-listing-meta {
        flex-direction: column;
        gap: 5px;
        align-items: start;
    }
}

/* Utility Classes */
.postnow-text-center { text-align: center; }
.postnow-text-left { text-align: left; }
.postnow-text-right { text-align: right; }

.postnow-mt-0 { margin-top: 0; }
.postnow-mt-1 { margin-top: 0.5rem; }
.postnow-mt-2 { margin-top: 1rem; }
.postnow-mt-3 { margin-top: 1.5rem; }
.postnow-mt-4 { margin-top: 2rem; }

.postnow-mb-0 { margin-bottom: 0; }
.postnow-mb-1 { margin-bottom: 0.5rem; }
.postnow-mb-2 { margin-bottom: 1rem; }
.postnow-mb-3 { margin-bottom: 1.5rem; }
.postnow-mb-4 { margin-bottom: 2rem; }

.postnow-hidden { display: none; }
.postnow-block { display: block; }
.postnow-inline-block { display: inline-block; }
.postnow-flex { display: flex; }
.postnow-grid { display: grid; }