/**
 * Modern Create Listing - Enhanced UX with Subscription Banner
 * Professional, smooth, and user-friendly
 */

/* ==================== MAIN CONTAINER ==================== */
.listing-form-container {
    position: relative;
    max-width: 1400px; /* Increased from 1200px */
    margin: 0 auto;
    padding: 2rem 1rem;
    background: #f8f9fa;
    border-radius: 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    min-height: 100vh;
}

.form-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.98);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

/* ==================== SUBSCRIPTION BANNER ==================== */
.subscription-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

.banner-content-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.banner-text {
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.banner-icon-inline {
    color: #fbbf24;
    font-size: 1.25rem;
}

.banner-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-banner-primary,
.btn-banner-secondary {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-banner-primary {
    background: #fbbf24;
    color: #78350f;
}

.btn-banner-primary:hover {
    background: #f59e0b;
    transform: translateY(-1px);
}

.btn-banner-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
}

.btn-banner-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ==================== PAGE TITLE SECTION ==================== */
.page-title-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.title-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.title-icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.75rem;
    flex-shrink: 0;
}

.page-title-section h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.25rem 0;
}

.page-title-section p {
    color: #6b7280;
    margin: 0;
}

/* ==================== STEPPER SIMPLE ==================== */
.stepper-simple {
    background: white;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.stepper-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.stepper-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 60px;
    right: 60px;
    height: 2px;
    background: #e5e7eb;
    z-index: 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    position: relative;
    z-index: 1;
    flex: 1;
    transition: all 0.3s ease;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.step.active .step-number {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    transform: scale(1.1);
}

.step.completed .step-number {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.step-text {
    text-align: center;
}

.step-name {
    font-weight: 600;
    color: #4b5563;
    font-size: 0.9375rem;
}

.step.active .step-name {
    color: #1f2937;
}

.step-desc {
    font-size: 0.8125rem;
    color: #9ca3af;
}

/* ==================== FORM CONTENT ==================== */
.form-content {
    background: white;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.step-panel {
    animation: fadeInUp 0.4s ease-out;
}

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

/* ==================== FORM NAVIGATION ==================== */
.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 2px solid #f3f4f6;
}

.nav-spacer {
    flex: 1;
}

/* ==================== FORM GROUPS ==================== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

.form-label .required {
    color: #ef4444;
    margin-left: 0.25rem;
}

/* Fix FontAwesome Icons - Use proper classes */
.form-label .fas,
.form-label .far,
.form-label .fab {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900;
    margin-right: 0.5rem;
}

/* ==================== LOCATION MAP ==================== */
.location-map-container {
    margin-bottom: 1.5rem;
}

.map-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #e5e7eb;
    margin-top: 0.5rem;
}

#location-map {
    height: 400px;
    width: 18vw;
    z-index: 1;
}

.map-search-container {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    z-index: 1000; /* Higher than map */
}

.map-search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9375rem;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.map-search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Autocomplete Dropdown - HIGH Z-INDEX */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    z-index: 10000 !important; /* Even higher than map controls */
    margin-top: -2px;
}

.autocomplete-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid #f3f4f6;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
    background: #f3f4f6;
}

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

/* ==================== SELECT STYLING ==================== */
.select-wrapper {
    position: relative;
}

.select-icon {
    position: absolute;
    right: 1.125rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #9ca3af;
    font-size: 0.875rem;
}

.form-select {
    appearance: none;
    padding-right: 3rem;
    cursor: pointer;
}

.form-select:disabled {
    background: #f9fafb;
    color: #9ca3af;
    cursor: not-allowed;
}

/* ==================== INPUT GROUP ==================== */
.input-group {
    position: relative;
    display: flex;
}

.input-group .input-prefix {
    position: static;
    transform: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-right: none;
    border-radius: 10px 0 0 10px;
    color: #6b7280;
    font-weight: 600;
}

.input-group .form-input {
    border-left: none;
    border-radius: 0 10px 10px 0;
}

/* ==================== FEATURE PILLS ==================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.feature-pill {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.feature-pill:hover {
    border-color: #22c55e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.15);
}

.feature-pill.selected {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: #22c55e;
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.2);
}

.pill-icon {
    font-size: 1.5rem;
}

.pill-text {
    flex: 1;
    font-weight: 500;
    color: #374151;
}

.pill-check {
    font-size: 1.25rem;
    color: #22c55e;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.feature-pill.selected .pill-check {
    opacity: 1;
}

/* ==================== PRICING CARD ==================== */
.pricing-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #e9ecef;
    border-radius: 16px;
    padding: 1.75rem;
}

.card-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1.5rem;
}

.price-inputs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.price-summary {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px dashed #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-label {
    font-size: 1rem;
    font-weight: 600;
    color: #6b7280;
}

.summary-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #22c55e;
}

/* ==================== PHOTO UPLOADS ==================== */
.photo-upload-section {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.upload-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
}

.main-photo-dropzone,
.photo-dropzone {
    border: 3px dashed #d1d5db;
    border-radius: 16px;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.3s ease;
}

.main-photo-dropzone {
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-photo-dropzone:hover,
.photo-dropzone:hover {
    border-color: #22c55e;
    background: #f0fdf4;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.15);
}

.dropzone-content {
    text-align: center;
    padding: 2rem;
}

.dropzone-icon {
    font-size: 4rem;
    color: #9ca3af;
    margin-bottom: 1.25rem;
}

.dropzone-text {
    font-size: 1.125rem;
    color: #374151;
    margin-bottom: 0.5rem;
}

.dropzone-text strong {
    color: #22c55e;
}

.dropzone-hint {
    font-size: 0.875rem;
    color: #9ca3af;
}

.photo-preview {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #f3f4f6;
}

.main-preview {
    aspect-ratio: 16 / 9;
    max-height: 400px;
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.photo-preview:hover .preview-overlay {
    opacity: 1;
}

/* ==================== PHOTOS GRID ==================== */
.photos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.photo-slot {
    aspect-ratio: 1;
}

.photo-dropzone.small {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.photo-dropzone.small i {
    font-size: 1.75rem;
}

/* ==================== GUIDELINES BANNER ==================== */
.guidelines-banner {
    display: flex;
    gap: 1.25rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #fbbf24;
    border-radius: 16px;
    margin-bottom: 1.5rem;
}

.banner-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.banner-content strong {
    display: block;
    font-size: 1rem;
    color: #92400e;
    margin-bottom: 0.625rem;
}

.banner-content ul {
    margin: 0;
    padding-left: 1.25rem;
    color: #92400e;
}

.banner-content ul li {
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

/* ==================== REVIEW GRID ==================== */
.review-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.review-card {
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 16px;
    overflow: hidden;
}

.review-card.col-span-2 {
    grid-column: span 2;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
}

.card-header i {
    color: #22c55e;
    font-size: 1.125rem;
}

.card-header span {
    flex: 1;
    font-weight: 600;
    color: #1f2937;
}

.btn-edit {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #6b7280;
    background: transparent;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-edit:hover {
    color: #22c55e;
    border-color: #22c55e;
    background: #f0fdf4;
}

.card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.review-item {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.item-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.item-value {
    font-size: 0.9375rem;
    color: #1f2937;
    font-weight: 500;
}

.item-value.price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #22c55e;
}

.review-item.highlight {
    padding: 1rem;
    background: #f0fdf4;
    border-radius: 10px;
}

.item-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.badge {
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 500;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

/* ==================== PHOTOS PREVIEW ==================== */
.photos-preview {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.preview-thumb {
    width: 120px;
    height: 120px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.preview-thumb.main {
    width: 180px;
    height: 180px;
}

.preview-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb-label {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    padding: 0.25rem 0.625rem;
    background: rgba(34, 197, 94, 0.95);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
}

/* ==================== TERMS CARD ==================== */
.terms-card {
    background: #fef3c7;
    border: 2px solid #fbbf24;
    border-radius: 16px;
    padding: 1.75rem;
    margin-top: 2rem;
}

.terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    cursor: pointer;
}

.terms-checkbox input[type="checkbox"] {
    margin-top: 0.25rem;
}

.checkbox-text {
    flex: 1;
    font-size: 0.9375rem;
    color: #92400e;
    line-height: 1.6;
}

.checkbox-text a {
    color: #b45309;
    font-weight: 600;
    text-decoration: underline;
}

.checkbox-text a:hover {
    color: #92400e;
}

/* ==================== VALIDATION & HINTS ==================== */
.validation-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #b91c1c;
    font-size: 0.8125rem;
    font-weight: 500;
}

.form-hint {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: #6b7280;
    line-height: 1.5;
}

.form-hint i {
    margin-top: 0.125rem;
    color: #9ca3af;
}

.form-hint.disabled {
    opacity: 0.6;
}

/* ==================== RESPONSIVE STYLES ==================== */
/* Responsive Design */
@media (max-width: 1200px) {
    .listing-form-container {
        max-width: 100%;
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    .stepper-steps {
        flex-direction: column;
        gap: 1rem;
    }

    .stepper-steps::before {
        display: none;
    }

    .step {
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
    }

    .step-text {
        text-align: left;
    }

    .form-content {
        padding: 1.5rem;
    }

    .form-navigation {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-spacer {
        display: none;
    }

    .banner-content-wrapper {
        flex-direction: column;
        text-align: center;
    }

    #location-map {
        height: 300px;
    }
}

/* ==================== LEAFLET MAP OVERRIDES ==================== */
.leaflet-container {
    font-family: inherit;
}

.leaflet-popup-content-wrapper {
    border-radius: 8px;
}

.leaflet-control {
    z-index: 999 !important; /* Lower than autocomplete */
}

/* Search Input Wrapper & Clear Button */
.search-input-wrapper {
    position: relative;
}

.search-clear-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
 background: transparent;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    z-index: 10001 !important;
}

.search-clear-btn:hover {
    background: #f3f4f6;
    color: #1f2937;
}

/* Autocomplete Item Styling */
.autocomplete-main {
font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    font-size: 0.9375rem;
}

.autocomplete-sub {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
    padding-left: 1.5rem;
}

.autocomplete-item.no-results {
    color: #6b7280;
    font-style: italic;
    text-align: center;
    padding: 1rem;
}

/* Selected Location Display Card */
.selected-location {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-top: 1rem;
}

.location-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.location-details {
    flex: 1;
}

.location-details strong {
    display: block;
    margin-bottom: 0.5rem;
    color: #1e40af;
}

.location-text {
    color: #4b5563;
    line-height: 1.5;
}

/* Map Loading State */
#location-map.loading {
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

#location-map.loading::after {
    content: "Loading map...";
  color: #6b7280;
    font-size: 0.875rem;
}
