/* listing-specific styles (extends form-styles.css) */

/* UPLOAD ZONE */
.upload-zone {
    border: 2px dashed #d1d9e0;
    border-radius: 14px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all .3s;
    background: #fafcfe;
    position: relative;
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: #4da8da;
    background: #edf6fb;
    box-shadow: 0 0 20px rgba(77, 168, 218, .1);
}

.upload-icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.upload-text {
    font-size: 14px;
    font-weight: 600;
    color: #1e2d3d;
    margin-bottom: 4px;
}

.upload-hint {
    font-size: 12px;
    color: #7f8c9b;
}

.upload-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* PHOTO PREVIEW GRID */
.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.preview-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #d1d9e0;
    aspect-ratio: 4/3;
}

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

.preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(231, 76, 60, .9);
    color: #fff;
    border: none;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    line-height: 1;
}

.preview-remove:hover {
    background: #c0392b;
    transform: scale(1.1);
}

.floor-preview {
    aspect-ratio: auto;
    max-height: 200px;
}

.floor-preview img {
    object-fit: contain;
}

.video-preview-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    margin-top: 10px;
    background: #edf6fb;
    border: 1px solid rgba(77, 168, 218, .15);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    color: #1e2d3d;
}

/* SAVED LISTINGS PANEL */
.saved-panel {
    border: 2px solid rgba(142, 68, 173, .2);
    background: linear-gradient(135deg, #faf5ff, #fff);
}

.saved-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    margin-bottom: 8px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    transition: all .2s;
}

.saved-item:hover {
    border-color: rgba(142, 68, 173, .3);
    box-shadow: 0 2px 10px rgba(142, 68, 173, .06);
}

.saved-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.saved-item-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8e44ad, #9b59b6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.saved-item-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e2d3d;
    margin-bottom: 2px;
}

.saved-item-meta {
    font-size: 11.5px;
    color: #7f8c9b;
}

.saved-item-delete {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #eee;
    background: #fff;
    color: #e74c3c;
    font-size: 16px;
    cursor: pointer;
    transition: all .2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.saved-item-delete:hover {
    background: #e74c3c;
    color: #fff;
    border-color: #e74c3c;
}

.saved-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* TEMPLATE SECTION */
.template-section {
    border: 2px solid rgba(22, 160, 133, .2);
    background: linear-gradient(135deg, #f0faf8, #fff);
}

.template-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.template-card-text {
    font-size: 13.5px;
    color: #1e2d3d;
    line-height: 1.6;
    margin-bottom: 6px;
}

.template-card-hint {
    font-size: 12px;
    color: #7f8c9b;
    font-style: italic;
}

.template-dl-btn {
    padding: 14px 28px;
    background: linear-gradient(135deg, #16a085, #1abc9c);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all .3s;
    white-space: nowrap;
    flex-shrink: 0;
}

.template-dl-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(22, 160, 133, .2);
}

/* SUBMIT AREA */
.listing-submit-area {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 24px 0 40px;
}

.save-another-btn {
    background: linear-gradient(135deg, #8e44ad, #9b59b6) !important;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .upload-zone {
        padding: 22px 16px;
    }

    .upload-icon {
        font-size: 28px;
    }

    .upload-text {
        font-size: 13px;
    }

    .preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .upload-zone {
        padding: 18px 12px;
    }

    .preview-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .template-card {
        flex-direction: column;
        text-align: center;
    }

    .listing-submit-area {
        flex-direction: column;
        align-items: stretch;
    }

    .saved-item-meta {
        font-size: 10.5px;
    }
}

/* GOOGLE DRIVE INSTRUCTIONS */
.drive-instructions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 16px;
    background: linear-gradient(135deg, #fff8e1, #fff3cd);
    border: 1px solid #f0d060;
    border-radius: 12px;
}

.drive-step {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #5a4a1e;
    font-weight: 500;
    flex: 1 1 200px;
}

.drive-step-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .drive-instructions {
        flex-direction: column;
        gap: 8px;
    }

    .drive-step {
        flex: 1 1 100%;
    }
}