/**
 * PaddockPages Frontend Styles
 * Core directory styling for the PaddockPages directory plugin
 */

:root {
    --ochre: #C2703A;
    --ochre-dark: #A85D2E;
    --ochre-light: #D4824A;
    --terracotta: #B85C3A;
    --rust: #9C4428;
    --earth: #3D2B1F;
    --earth-light: #5A4233;
    --wheat: #D4A843;
    --wheat-light: #E8C96A;
    --wheat-pale: #F0D88A;
    --sand: #E8DCC8;
    --cream: #F5F0E8;
    --milk: #FAF8F4;
    --bark: #6B5344;
    --sky: #6A9AB0;
    --pro-gold: #C9952B;
    --shadow: rgba(61, 43, 31, 0.08);
    --shadow-md: rgba(61, 43, 31, 0.12);
    --shadow-lg: rgba(61, 43, 31, 0.18);
}

/* ── LISTING CARDS ── */
.listings-grid {
    display: grid;
    gap: 20px;
}

.listing-card {
    background: white;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.06);
    overflow: hidden;
    transition: all 0.3s ease;
    display: grid;
    grid-template-columns: 260px 1fr;
    position: relative;
}

.listing-card:hover {
    box-shadow: 0 16px 48px var(--shadow-md);
    transform: translateY(-2px);
}

/* Tier-specific borders */
.listing-card.tier-pro {
    border: 2px solid var(--ochre);
    box-shadow: 0 4px 20px rgba(194, 112, 58, 0.12);
}

.listing-card.tier-premium {
    border: 2px solid var(--pro-gold);
    box-shadow: 0 4px 20px rgba(201, 149, 43, 0.12);
}

.listing-card.tier-essential {
    border: 1px solid rgba(0,0,0,0.06);
}

.listing-image {
    height: 100%;
    min-height: 220px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.listing-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--earth);
}

.badge-essential {
    background: var(--cream);
    color: var(--earth-light);
}

.badge-premium {
    background: linear-gradient(135deg, var(--pro-gold), #E0B44C);
    color: var(--earth);
}

.badge-pro {
    background: var(--ochre);
    color: white;
}

.listing-body {
    padding: 1.5rem 1.75rem;
    display: flex;
    flex-direction: column;
}

.listing-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.listing-name {
    font-family: 'Fraunces', serif;
    font-size: 1.3rem;
    color: var(--earth);
    font-weight: 600;
}

.listing-location {
    font-size: 0.85rem;
    color: var(--bark);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.listing-desc {
    font-size: 0.9rem;
    color: var(--earth-light);
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.listing-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.listing-tag {
    background: var(--cream);
    color: var(--earth-light);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

.listing-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid rgba(0,0,0,0.06);
    gap: 12px;
    flex-wrap: wrap;
}

.listing-features {
    display: flex;
    gap: 14px;
    font-size: 0.78rem;
    color: var(--bark);
}

.listing-feature {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ── BUTTONS ── */
.btn-view {
    padding: 10px 20px;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-view-essential {
    background: var(--cream);
    color: var(--earth);
}
.btn-view-essential:hover { background: #EBE5D8; }

.btn-view-premium {
    background: linear-gradient(135deg, var(--pro-gold), #D4A843);
    color: var(--earth);
}
.btn-view-premium:hover { filter: brightness(1.08); }

.btn-view-pro {
    background: var(--ochre);
    color: white;
}
.btn-view-pro:hover { background: var(--ochre-dark); }

.btn-enquire {
    padding: 10px 20px;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid var(--ochre);
    background: transparent;
    color: var(--ochre);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-enquire:hover {
    background: var(--ochre);
    color: white;
}

/* ── CATEGORIES & REGIONS ── */
.categories-grid,
.regions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.category-card {
    background: white;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 14px;
    padding: 1.5rem 1.2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--earth);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px var(--shadow-md);
    border-color: var(--ochre);
}

.category-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--sand) 0%, var(--cream) 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
}

.category-name {
    font-weight: 600;
    font-size: 0.92rem;
    margin-bottom: 0.25rem;
}

.category-count {
    font-size: 0.78rem;
    color: var(--bark);
}

.region-card {
    background: white;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 14px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--earth);
    display: flex;
    align-items: center;
    gap: 16px;
}

.region-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px var(--shadow-md);
    border-color: var(--ochre);
}

.region-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--sand) 0%, var(--cream) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.region-info {
    flex: 1;
}

.region-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 2px;
}

.region-count {
    font-size: 0.82rem;
    color: var(--bark);
}

/* ── LISTING CONTROLS ── */
.listings-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-tabs {
    display: flex;
    gap: 8px;
}

.filter-tab {
    padding: 8px 18px;
    border-radius: 100px;
    border: 1px solid rgba(0,0,0,0.1);
    background: white;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.filter-tab.active, .filter-tab:hover {
    background: var(--earth);
    color: var(--cream);
    border-color: var(--earth);
}

.results-count {
    font-size: 0.88rem;
    color: var(--bark);
}

/* ── DASHBOARD ── */
.paddock-dashboard {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 10px;
}

.status-unclaimed {
    background: var(--cream);
    color: var(--bark);
}

.status-pending {
    background: var(--wheat-light);
    color: var(--earth);
}

.status-claimed {
    background: #d4edda;
    color: #155724;
}

.tier-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--sand);
    color: var(--earth);
}

.dashboard-actions {
    display: flex;
    gap: 8px;
}

/* ── EDIT LISTING FORM ── */
.paddock-edit-listing {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.form-section {
    background: white;
    border-radius: 14px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0,0,0,0.06);
}

.form-section h3 {
    font-family: 'Fraunces', serif;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--earth);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--earth-light);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--ochre);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.save-btn {
    padding: 14px 28px;
    background: var(--ochre);
    color: white;
    border: none;
    border-radius: 10px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
}

.save-btn:hover {
    background: var(--ochre-dark);
}

.btn-cancel {
    padding: 14px 28px;
    background: transparent;
    color: var(--bark);
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 10px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-cancel:hover {
    background: var(--cream);
}

/* ── CLAIM & ENQUIRY BOXES ── */
.claim-box,
.enquiry-box {
    background: var(--cream);
    border-radius: 14px;
    padding: 1.75rem;
    margin-top: 2rem;
}

.claim-box h3,
.enquiry-box h3 {
    font-family: 'Fraunces', serif;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.claim-box p,
.enquiry-box p {
    color: var(--bark);
    margin-bottom: 1.25rem;
}

.claim-success {
    text-align: center;
    padding: 1.5rem;
}

.claim-success h3 {
    font-family: 'Fraunces', serif;
    color: var(--ochre);
}

/* ── SINGLE LISTING PAGE ── */
.single-listing .listing-hero {
    height: 300px;
    background-size: cover;
    background-position: center;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.single-listing .listing-hero .listing-badge {
    top: auto;
    bottom: 16px;
    left: 20px;
}

.single-listing .listing-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.single-listing .listing-main {
    background: white;
    border-radius: 14px;
    padding: 2rem;
    border: 1px solid rgba(0,0,0,0.06);
}

.single-listing .listing-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-widget {
    background: white;
    border-radius: 14px;
    padding: 1.5rem;
    border: 1px solid rgba(0,0,0,0.06);
}

.sidebar-widget h4 {
    font-family: 'Fraunces', serif;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--earth);
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.detail-label {
    font-size: 0.85rem;
    color: var(--bark);
}

.detail-value {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--earth);
}

/* ── ARCHIVE PAGE ── */
.archive-listing .content-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem;
}

.archive-listing .section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.archive-listing .section-title {
    font-family: 'Fraunces', serif;
    font-size: 2.5rem;
    color: var(--earth);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    .listing-card {
        grid-template-columns: 1fr;
    }
    .listing-image {
        min-height: 180px;
    }
    .single-listing .listing-content {
        grid-template-columns: 1fr;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .listings-controls {
        flex-direction: column;
        align-items: flex-start;
    }
    .filter-tabs {
        overflow-x: auto;
        width: 100%;
    }
    .dashboard-actions {
        flex-direction: column;
    }
    .dashboard-actions a,
    .dashboard-actions button {
        width: 100%;
        justify-content: center;
    }
}
