/* ==========================================================================
   Manzil360 Forms Master Stylesheet (m360-forms.css)
   Clean, class-based modular form styling with responsive design
   ========================================================================== */

/* Form Wrapper & Containers */
.m360-form-wrapper {
    max-width: 920px;
    margin: 30px auto 60px auto;
    padding: 0 20px;
}

.m360-form-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 12px;
    flex-wrap: wrap;
}

.m360-form-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    font-weight: 700;
    color: #475569;
    text-decoration: none;
    transition: color 0.15s ease;
}

.m360-form-back-link:hover {
    color: #2563eb;
}

.m360-form-step-badge {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    color: #2563eb;
    display: flex;
    align-items: center;
    gap: 6px;
}

.m360-form-card {
    background: #ffffff;
    padding: 35px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
}

.m360-form-validation-summary {
    background: #fffbeb;
    color: #b45309;
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 14px;
    border: 1px solid #fde68a;
}

/* Form Section Headers */
.m360-form-section-title {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
    margin-top: 32px;
    margin-bottom: 20px;
}

.m360-form-section-title:first-of-type {
    margin-top: 0;
}

.m360-form-section-title i {
    color: #2563eb;
}

/* Field Groups & Labels */
.m360-field-group {
    margin-bottom: 20px;
    position: relative;
}

.m360-field-label {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    display: block;
    margin-bottom: 8px;
}

.m360-field-label-hint {
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
}

/* Form Grids */
.m360-grid-2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.m360-grid-3col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.m360-grid-4col {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.m360-grid-2-1col {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.m360-grid-1-2col {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* Pill Chips Selection Grids */
.m360-pill-group-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    max-width: 480px;
}

.m360-pill-group-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    max-width: 600px;
}

.m360-pill-group-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.m360-pill-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    background: #ffffff;
    color: #334155;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.m360-pill-chip:hover {
    border-color: #93c5fd;
    background: #f8fafc;
    color: #1e40af;
}

.m360-pill-chip.active {
    background: #eff6ff;
    border-color: #2563eb;
    color: #1d4ed8;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

/* Select & Input Control Styling */
.m360-select-wrapper {
    position: relative;
    width: 100%;
}

.m360-select-input {
    font-size: 15px;
    font-weight: 700;
    padding: 12px 38px 12px 16px;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    background-color: #ffffff;
    cursor: pointer;
    width: 100%;
    color: #0f172a;
    appearance: none;
    -webkit-appearance: none;
}

.m360-select-input:focus {
    border-color: #2563eb;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.m360-select-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    pointer-events: none;
}

.m360-input-wrapper {
    position: relative;
    width: 100%;
}

.m360-input-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

/* Amenities Sections & Checkbox Cards */
.m360-amenities-container {
    margin-bottom: 24px;
}

.m360-amenities-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.m360-amenities-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.m360-amenities-actions {
    display: flex;
    gap: 8px;
}

.m360-btn-select-all {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #2563eb;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s;
}

.m360-btn-select-all:hover {
    background: #dbeafe;
}

.m360-btn-clear-all {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s;
}

.m360-btn-clear-all:hover {
    background: #e2e8f0;
}

.m360-amenities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.m360-amenity-card {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    background: #ffffff;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    cursor: pointer;
    transition: all 0.15s ease;
}

.m360-amenity-card:hover {
    border-color: #93c5fd;
    background: #f8fafc;
}

.m360-amenity-card input[type="checkbox"] {
    accent-color: #2563eb;
    width: 17px;
    height: 17px;
    cursor: pointer;
    margin: 0;
}

.m360-amenity-card-text {
    font-weight: 600;
    color: #334155;
}

/* Upload Cards & Document Upload Sections */
.m360-upload-card {
    margin-bottom: 20px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    padding: 18px;
    border-radius: 12px;
    transition: border-color 0.2s;
}

.m360-upload-card:hover {
    border-color: #cbd5e1;
}

.m360-upload-label {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.m360-upload-hint {
    font-size: 11.5px;
    color: #64748b;
    margin-top: 5px;
}

/* Image & PDF Previews */
.m360-preview-container {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.m360-preview-img-wrapper {
    position: relative;
    width: 100px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.m360-preview-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.m360-preview-delete-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(220, 38, 38, 0.9);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    cursor: pointer;
    font-weight: bold;
}

.m360-doc-preview-item {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #eff6ff;
    border: 1.5px solid #bfdbfe;
    padding: 8px 14px;
    border-radius: 8px;
    min-width: 200px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
}

.m360-doc-preview-info {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.m360-doc-preview-name {
    font-size: 12.5px;
    font-weight: 700;
    color: #1e40af;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.m360-doc-preview-size {
    font-size: 11px;
    color: #64748b;
}

/* Action Bars & Submit Buttons */
.m360-form-actions {
    margin-top: 35px;
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.m360-btn-submit-main {
    background: #2563eb;
    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
    padding: 14px 36px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    transition: all 0.2s ease;
}

.m360-btn-submit-main:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
}

.m360-btn-cancel-link {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 8px;
}

.m360-btn-cancel-link:hover {
    color: #0f172a;
    background: #f1f5f9;
}

/* ==========================================================================
   Responsive Breakpoints for Forms
   ========================================================================== */
@media (max-width: 768px) {
    .m360-form-wrapper {
        margin: 15px auto 40px auto;
        padding: 0 12px;
    }

    .m360-form-card {
        padding: 20px 16px;
        border-radius: 12px;
    }

    .m360-grid-2col,
    .m360-grid-3col,
    .m360-grid-4col,
    .m360-grid-2-1col,
    .m360-grid-1-2col {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 16px;
    }

    .m360-pill-group-3,
    .m360-pill-group-4 {
        grid-template-columns: repeat(2, 1fr);
        max-width: 100%;
    }

    .m360-amenities-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .m360-form-actions {
        flex-direction: column-reverse;
        width: 100%;
    }

    .m360-btn-submit-main {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
    }

    .m360-btn-cancel-link {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .m360-pill-group-3,
    .m360-pill-group-4 {
        grid-template-columns: 1fr;
    }

    .m360-pill-chip {
        padding: 8px 12px;
        font-size: 13px;
    }

    .m360-form-section-title {
        font-size: 16px;
    }
}

/* ==========================================================================
   City & Locality Autocomplete Dropdown Styles (Exact Replica)
   ========================================================================== */
.mb-autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
    max-height: 290px;
    overflow-y: auto;
    z-index: 10000;
    padding: 6px 0;
}

.mb-autocomplete-header {
    padding: 8px 14px 6px 14px;
    font-size: 11px;
    font-weight: 800;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid #f1f5f9;
    background: #ffffff;
}

.mb-autocomplete-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 14px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    font-size: 13.5px;
    font-weight: 600;
    color: #1e293b;
    border-bottom: 1px solid #f8fafc;
}

.mb-autocomplete-item:last-child {
    border-bottom: none;
}

.mb-autocomplete-item:hover,
.mb-autocomplete-item.active {
    background: #eff6ff;
    color: #2563eb;
    font-weight: 700;
}

.mb-autocomplete-left {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mb-autocomplete-left i {
    color: #2563eb;
    font-size: 13px;
    flex-shrink: 0;
}

.mb-autocomplete-city {
    font-size: 11.5px;
    color: #94a3b8;
    font-weight: 500;
    flex-shrink: 0;
    margin-left: 8px;
}

