/**
 * Listing Craft - Base CSS
 * 
 * Minimal structural styles only. No design/aesthetics.
 * External renderer plugins should provide all visual styling.
 */

/* Reset - ensure consistent box model */
.lc-listings,
.lc-listings *,
.lc-form,
.lc-form *,
.lc-my-listings,
.lc-my-listings * {
    box-sizing: border-box;
}

/* Basic layout structures */
.lc-listings {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.lc-listing-item {
    width: 100%;
}

.lc-columns-2 .lc-listing-item { width: calc(50% - 0.5rem); }
.lc-columns-3 .lc-listing-item { width: calc(33.333% - 0.667rem); }
.lc-columns-4 .lc-listing-item { width: calc(25% - 0.75rem); }

@media (max-width: 768px) {
    .lc-columns-2 .lc-listing-item,
    .lc-columns-3 .lc-listing-item,
    .lc-columns-4 .lc-listing-item {
        width: 100%;
    }
}

/* Form structure */
.lc-form {
    max-width: 600px;
}

.lc-field {
    margin-bottom: 1rem;
}

.lc-field label {
    display: block;
    margin-bottom: 0.25rem;
}

.lc-field input[type="text"],
.lc-field input[type="email"],
.lc-field input[type="url"],
.lc-field input[type="number"],
.lc-field input[type="tel"],
.lc-field textarea,
.lc-field select {
    width: 100%;
    padding: 0.5rem;
}

.lc-field textarea {
    min-height: 100px;
    resize: vertical;
}

.lc-field-desc {
    display: block;
    font-size: 0.875em;
    opacity: 0.7;
    margin-top: 0.25rem;
}

.lc-form-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

/* Table structure */
.lc-table {
    width: 100%;
    border-collapse: collapse;
}

.lc-table th,
.lc-table td {
    padding: 0.5rem;
    text-align: left;
}

/* Minimal button reset */
.lc-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    text-decoration: none;
    cursor: pointer;
    border: none;
}

.lc-btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.875em;
}

/* Single listing fallback structure */
.lc-single {
    max-width: 800px;
}

.lc-single .lc-header {
    margin-bottom: 1rem;
}

.lc-single .lc-title {
    margin: 0 0 0.5rem;
}

.lc-single .lc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.lc-single .lc-image img {
    max-width: 100%;
    height: auto;
}

.lc-single .lc-fields {
    display: grid;
    gap: 0.5rem;
    margin: 1rem 0;
}

.lc-single .lc-field {
    display: flex;
    gap: 0.5rem;
}

.lc-single .lc-field-label {
    font-weight: bold;
    min-width: 120px;
}

.lc-single .lc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Card fallback structure */
.lc-card {
    display: flex;
    flex-direction: column;
}

.lc-card-image img {
    width: 100%;
    height: auto;
    display: block;
}

.lc-card-body {
    padding: 1rem;
}

.lc-card-title {
    margin: 0 0 0.5rem;
}

.lc-card-excerpt {
    margin: 0.5rem 0;
}

/* Status badges */
.lc-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    font-size: 0.75em;
    border-radius: 2px;
}

/* Featured badge */
.lc-featured-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    font-size: 0.75em;
}

/* Search form structure */
.lc-search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: flex-end;
}

.lc-search-field {
    flex: 1;
    min-width: 150px;
}

.lc-search-field input,
.lc-search-field select {
    width: 100%;
    padding: 0.5rem;
}

/* Packages structure */
.lc-packages {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.lc-package {
    flex: 1;
    min-width: 200px;
    padding: 1rem;
}

.lc-package-features {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

/* My listings header */
.lc-my-listings .lc-header {
    margin-bottom: 1rem;
}

/* Messages */
.lc-no-results,
.lc-error,
.lc-login-required,
.lc-no-packages {
    padding: 1rem;
}

/* Pagination */
.lc-pagination {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    margin-top: 1rem;
}

/* Accessibility: focus states */
.lc-btn:focus,
.lc-form input:focus,
.lc-form select:focus,
.lc-form textarea:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* Screen reader only */
.lc-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

