/* Create Listing Page */

.create-listing-page {
    background: var(--sienna);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.create-listing-header {
    text-align: center;
    padding: 2rem 0;
}

.create-listing-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    color: var(--cream);
}

.page-intro {
    font-size: 1rem;
    font-weight: 400;
    color: var(--cream-light);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Content */
.create-listing-content {
    padding: 2rem 0 4rem;
    flex: 1;
}

.create-listing-content .container {
    max-width: 900px;
}

/* Form */
.listing-form {
    background: var(--color-surface);
    border: 3px solid var(--color-border);
    border-radius: 16px;
    box-shadow: 6px 6px 0 var(--color-shadow);
    padding: 2rem;
}

/* Form groups */
.listing-form .form-group {
    margin-bottom: 1.5rem;
}

.listing-form .form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text);
}

.listing-form .required {
    color: var(--color-primary);
}

.listing-form .optional {
    color: var(--color-text-muted);
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
}

/* Input styling */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 700;
    color: var(--color-text);
    background: var(--color-surface);
    border: 3px solid var(--color-border);
    border-radius: 12px;
    box-shadow: 4px 4px 0 var(--color-shadow);
    transition: all 0.2s ease;
}

.form-input:hover {
    transform: translateY(-2px);
    box-shadow: 6px 6px 0 var(--color-shadow);
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 6px 6px 0 var(--color-shadow);
}

.form-input::placeholder {
    color: var(--color-text-muted);
    font-weight: 400;
}

/* Textarea */
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 700;
    color: var(--color-text);
    background: var(--color-surface);
    border: 3px solid var(--color-border);
    border-radius: 12px;
    box-shadow: 4px 4px 0 var(--color-shadow);
    transition: all 0.2s ease;
    resize: vertical;
    min-height: 300px;
}

.form-textarea:hover {
    transform: translateY(-2px);
    box-shadow: 6px 6px 0 var(--color-shadow);
}

.form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 6px 6px 0 var(--color-shadow);
}

.form-textarea::placeholder {
    color: var(--color-text-muted);
    font-weight: 400;
}

/* Error messages */
.form-error {
    color: #c0392b;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    font-weight: 700;
}

.form-errors {
    background: #fdecea;
    border: 2px solid #c0392b;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.form-errors .form-error {
    margin: 0;
}

/* Form row for side-by-side fields */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 500px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Section titles */
.section-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-border);
}

/* Conditional fields */
.conditional-fields {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px dashed var(--color-border);
}

.form-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px dashed var(--color-border);
}

/* Alpine cloak */
[x-cloak] {
    display: none !important;
}

/* Form actions */
.form-actions {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--color-border);
    text-align: center;
}

.form-actions .btn {
    min-width: 250px;
}

/* Responsive */
@media (min-width: 768px) {
    .create-listing-header {
        padding: 3rem 0;
    }

    .create-listing-header h1 {
        font-size: 2.25rem;
    }

    .page-intro {
        font-size: 1.125rem;
    }

    .create-listing-content {
        padding: 3rem 0 4rem;
    }
}

@media (max-width: 600px) {
    .listing-form {
        padding: 1.5rem;
    }

    .form-actions .btn {
        width: 100%;
    }
}

/* Image upload */
.image-upload-wrapper {
    position: relative;
}

.image-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

.image-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem;
    background: var(--color-surface);
    border: 3px dashed var(--color-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.image-upload-label:hover {
    border-color: var(--color-primary);
    background: var(--cream-light);
}

.upload-icon {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface);
    border: 3px solid var(--color-border);
    border-radius: 50%;
}

.upload-text {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

/* Image preview grid */
.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.image-preview-item {
    position: relative;
    aspect-ratio: 1;
    border: 3px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 3px 3px 0 var(--color-shadow);
}

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

.image-remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    padding: 0;
    background: var(--color-primary);
    color: var(--cream);
    border: 2px solid var(--color-border);
    border-radius: 50%;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.image-remove-btn:hover {
    transform: scale(1.1);
}

/* Guest choice section */
.guest-choice-section {
    padding: 0 0 1rem;
}

.guest-choice-box {
    background: var(--cream);
    border: 3px solid var(--color-border);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    box-shadow: 4px 4px 0 var(--color-shadow);
    max-width: 900px;
    margin: 0 auto;
}

.guest-choice-intro {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.guest-choice-options {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.guest-choice-separator {
    color: var(--color-text-muted);
    font-weight: 400;
}

.guest-choice-continue {
    font-weight: 700;
    color: var(--color-primary);
}

.guest-choice-info {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

@media (max-width: 500px) {
    .guest-choice-options {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Turnstile section */
.turnstile-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.turnstile-section .section-title {
    width: 100%;
    text-align: left;
}

.turnstile-section .form-error {
    margin-bottom: 1rem;
}
