/*
Theme Name: ADNEX Global Local Directory
Theme URI: https://adnexglobal.com/
Description: Child theme for ADNEX Global
Author: Muhammad Hammad
Author URI: https://adnexglobal.com/
Template: hello-elementor
Version: 1.0.0
Text Domain: adnex-global-local-directory
*/


/* =========================================================
   REMOVE THE NORMAL WORDPRESS / ELEMENTOR HEADER
   ========================================================= */

/*
 * The dashboard PHP calls get_header(), so the normal
 * theme header can appear above the dashboard.
 *
 * Hide it only on the ADNEX dashboard page.
 */

body:has(.adnex-dashboard-wrapper) > header,
body:has(.adnex-dashboard-wrapper) .site-header,
body:has(.adnex-dashboard-wrapper) .elementor-location-header,
body:has(.adnex-dashboard-wrapper) .elementor-location-header > *,
body:has(.adnex-dashboard-wrapper) .elementor-location-header .elementor,
body:has(.adnex-dashboard-wrapper) header#site-header {
    display: none !important;
}


/* =========================================================
   DASHBOARD PAGE
   ========================================================= */

body:has(.adnex-dashboard-wrapper) {
    margin: 0 !important;
    padding: 0 !important;
    background: #f3fbf8;
}


/* =========================================================
   MAIN DASHBOARD WRAPPER
   ========================================================= */

.adnex-dashboard-wrapper {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch;

    width: 100%;
    min-height: 100vh;

    margin: 0;
    padding: 0;

    box-sizing: border-box;
}


/* =========================================================
   SIDEBAR
   ========================================================= */

.adnex-dashboard-sidebar {
    position: relative;

    flex: 0 0 205px;
    width: 205px;
    min-width: 205px;

    min-height: 100vh;

    margin: 0;
    padding: 0;

    box-sizing: border-box;

    background: #ffffff;
    border-right: 1px solid #e8edf0;
}


/* =========================================================
   SIDEBAR LOGO
   ========================================================= */

.adnex-dashboard-logo {
    display: flex;
    align-items: baseline;
    gap: 4px;

    height: 52px;

    padding: 0 16px;

    box-sizing: border-box;

    border-bottom: 1px solid #eef1f3;
}

.adnex-dashboard-logo strong {
    margin: 0;

    font-size: 11px;
    line-height: 52px;
    font-weight: 800;

    color: #111827;
}

.adnex-dashboard-logo span {
    margin: 0;

    font-size: 7px;
    line-height: 52px;

    color: #94a3b8;
}


/* =========================================================
   SIDEBAR USER
   ========================================================= */

.adnex-dashboard-user {
    display: flex;
    align-items: center;

    gap: 8px;

    padding: 13px 14px;

    border-bottom: 1px solid #f0f2f4;

    box-sizing: border-box;
}

.adnex-dashboard-avatar {
    flex: 0 0 28px;

    width: 28px;
    height: 28px;

    overflow: hidden;

    border-radius: 50%;
}

.adnex-dashboard-avatar img {
    display: block;

    width: 28px;
    height: 28px;

    object-fit: cover;
}

.adnex-dashboard-user > div:last-child {
    min-width: 0;
}

.adnex-dashboard-user strong {
    display: block;

    margin: 0;


    color: #334155;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.adnex-dashboard-user small {
    display: block;

    margin-top: 2px;


    color: #94a3b8;
}


/* =========================================================
   SIDEBAR NAVIGATION
   ========================================================= */

.adnex-dashboard-navigation {
    display: flex;
    flex-direction: column;

    width: 100%;

    padding: 10px 8px;

    box-sizing: border-box;
}

.adnex-dashboard-navigation a {
    display: flex;
    align-items: center;

    width: 100%;
    min-height: 32px;

    margin: 1px 0;
    padding: 0 10px;

    box-sizing: border-box;

    border-radius: 5px;

    color: #64748b;


    text-decoration: none;

    transition:
        background-color .15s ease,
        color .15s ease;
}

.adnex-dashboard-navigation a:hover {
    background: #f0fdf8;
    color: #059669;
}

.adnex-dashboard-navigation a.active {
    background: #ecfdf5;
    color: #059669;
    font-weight: 600;
}


/* =========================================================
   MAIN DASHBOARD CONTENT
   ========================================================= */

.adnex-dashboard-content {
    flex: 1 1 auto;

    width: auto;
    min-width: 0;

    min-height: 100vh;

    margin: 0;
    padding: 24px 28px;

    box-sizing: border-box;

    background:
        linear-gradient(
            135deg,
            #effcf6 0%,
            #f4fbf8 55%,
            #eefbf7 100%
        );
}


/* =========================================================
   ADD LISTING PAGE
   ========================================================= */

.adnex-add-listing-page {
    width: 100%;

    margin: 0 auto;

    box-sizing: border-box;
}


/* =========================================================
   ADD LISTING HEADER
   ========================================================= */

.adnex-add-listing-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;

    margin: 0 0 13px;
}

.adnex-add-listing-heading {
    min-width: 0;
}

.adnex-add-listing-heading h1 {
    margin: 0 0 3px;


    color: #111827;
}

.adnex-add-listing-heading p {
    margin: 0;

    color: #64748b;
}


/*
 * Hide "Back to Listings" from the screenshot design.
 */
.adnex-add-listing-header > .adnex-outline-button {
    display: none !important;
}


/* =========================================================
   MAIN FORM CARD
   ========================================================= */

.adnex-listing-form {
    width: 100%;

    margin: 0;
    padding: 18px 20px 19px;

    box-sizing: border-box;

    background: #ffffff;

    border: 1px solid #eef1f3;
    border-radius: 9px;

    box-shadow:
        0 1px 3px rgba(15, 23, 42, .03);
}


/* =========================================================
   FORM SECTIONS
   ========================================================= */

.adnex-form-section {
    width: 100%;

    margin: 0 0 17px;
    padding: 0;

    box-sizing: border-box;

    background: transparent;

    border: 0;
    border-radius: 0;
}

.adnex-form-section:last-of-type {
    margin-bottom: 0;
}


/* =========================================================
   SECTION HEADINGS
   ========================================================= */

.adnex-section-heading {
    display: block;

    margin: 0 0 8px;
    padding: 0;
}

.adnex-section-number {
    display: none !important;
}

.adnex-section-heading h2 {
    margin: 0 0 2px;

    color: #1f2937;
}

.adnex-section-heading p {
    margin: 0;

    color: #94a3b8;
}


/* =========================================================
   FORM GRID
   ========================================================= */

.adnex-form-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    column-gap: 13px;
    row-gap: 8px;

    width: 100%;
}

.adnex-form-group {
    min-width: 0;
}

.adnex-form-group-full {
    grid-column: 1 / -1;
}


/* =========================================================
   LABELS
   ========================================================= */

.adnex-form-group label {
    display: block;

    margin: 0 0 3px;

    line-height: 1.35;
    font-weight: 600;

    color: #475569;
}

.adnex-form-group label span {
    margin-left: 1px;
    color: #ef4444;
}


/* =========================================================
   INPUTS
   ========================================================= */

.adnex-form-control {
    display: block;

    width: 100%;
    height: 28px;
    min-height: 28px;

    margin: 0;
    padding: 20px 10px !important;

    box-sizing: border-box;

    border: 1px solid #e9edf0;
    border-radius: 4px;

    background: #f8fafb;

    color: #334155;

    outline: none;

    box-shadow: none;

    transition:
        border-color .15s ease,
        background-color .15s ease,
        box-shadow .15s ease;
}

.adnex-form-control:hover {
    border-color: #d9e1e5;
}

.adnex-form-control:focus {
    background: #ffffff;

    border-color: #9bd9c3;

    box-shadow:
        0 0 0 2px rgba(5, 150, 105, .05);
}

.adnex-form-control::placeholder {
    color: #a6b0ba;
    opacity: 1;
}


/* =========================================================
   SELECT
   ========================================================= */

select.adnex-form-control {
    cursor: pointer;
}


/* =========================================================
   TEXTAREA
   ========================================================= */

.adnex-textarea {
    height: 55px;
    min-height: 55px;

    resize: vertical;

    line-height: 1.45;
}


/* =========================================================
   HELP TEXT
   ========================================================= */

.adnex-field-help {
    margin: 3px 0 0;


    color: #9aa5af;
}


/* =========================================================
   FILE UPLOAD
   ========================================================= */

.adnex-file-upload {
    position: relative;

    width: 100%;
    height: 100px;
    min-height: 100px;

    box-sizing: border-box;

    border: 1px dashed #d9e1e5;
    border-radius: 5px;

    background: #fafbfc;

    overflow: hidden;

    transition:
        border-color .15s ease,
        background-color .15s ease;
}

.adnex-file-upload:hover {
    border-color: #9bd9c3;

    background: #f8fffb;
}

.adnex-file-upload input[type="file"] {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    opacity: 0;

    cursor: pointer;

    z-index: 2;
}

.adnex-upload-content {
    position: absolute;

    inset: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    flex-direction: column;

    gap: 2px;

    pointer-events: none;

    text-align: center;
}

.adnex-upload-icon {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 17px;
    height: 17px;

    margin: 0 0 1px;

    border-radius: 50%;

    background: #ecfdf5;
    color: #059669;

    font-size: 15px;
}

.adnex-upload-content strong {
    color: #475569;
}

.adnex-upload-content small {
    color: #a1aab5;
}


/* =========================================================
   MANAGER OPTIONS
   ========================================================= */

.adnex-manager-options {
    padding: 9px 10px;

    box-sizing: border-box;

    border: 1px solid #edf0f3;
    border-radius: 5px;

    background: #fafbfc;
}

.adnex-checkbox {
    display: flex;

    align-items: flex-start;

    gap: 6px;

    cursor: pointer;
}

.adnex-checkbox input {
    position: absolute;

    opacity: 0;
    pointer-events: none;
}

.adnex-checkbox-mark {
    flex: 0 0 12px;

    width: 12px;
    height: 12px;

    box-sizing: border-box;

    border: 1px solid #d2d8dd;
    border-radius: 3px;
}

.adnex-checkbox input:checked + .adnex-checkbox-mark {
    background: #059669;
    border-color: #059669;
}

.adnex-checkbox strong {
    display: block;

    margin: 0 0 1px;

    font-size: 7.5px;
    line-height: 1.3;

    color: #475569;
}

.adnex-checkbox small {
    display: block;

    font-size: 6px;
    line-height: 1.4;

    color: #94a3b8;
}


/* =========================================================
   SUCCESS MESSAGE
   ========================================================= */

.adnex-success-notice {
    margin: 0 0 10px;
    padding: 8px 10px;

    box-sizing: border-box;

    border: 1px solid #bbf7d0;
    border-radius: 5px;

    background: #ecfdf5;

    color: #047857;

    font-size: 7.5px;
}


/* =========================================================
   FORM FOOTER
   ========================================================= */

.adnex-form-footer {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin: 0;
    padding: 12px 0 0;

    border-top: 1px solid #f0f2f4;
}

.adnex-submit-note {
    display: flex;

    flex-direction: column;

    gap: 2px;

    min-width: 0;
}

.adnex-submit-note strong {
    margin: 0;

    font-size: 7.5px;
    line-height: 1.35;

    color: #475569;
}

.adnex-submit-note span {
    margin: 0;

    font-size: 6px;
    line-height: 1.4;

    color: #9ca3af;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.adnex-form-actions {
    display: flex;

    align-items: center;

    gap: 6px;

    flex-shrink: 0;
}

.adnex-primary-button,
.adnex-outline-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    height: 27px;
    min-height: 27px;

    padding: 0 14px;

    box-sizing: border-box;

    border-radius: 4px;

    font-size: 7px;
    line-height: 1;
    font-weight: 600;

    text-decoration: none;

    cursor: pointer;

    transition:
        background-color .15s ease,
        border-color .15s ease,
        color .15s ease,
        transform .15s ease,
        box-shadow .15s ease;
}

.adnex-primary-button {
    border: 1px solid #059669;

    background: #059669;

    color: #ffffff;
}

.adnex-primary-button:hover {
    background: #047857;
    border-color: #047857;

    color: #ffffff;

    transform: translateY(-1px);

    box-shadow:
        0 3px 8px rgba(5, 150, 105, .14);
}

.adnex-outline-button {
    border: 1px solid #dce2e6;

    background: #ffffff;

    color: #64748b;
}

.adnex-outline-button:hover {
    border-color: #059669;

    background: #ffffff;

    color: #059669;
}


/* =========================================================
   REMOVE ELEMENTOR / THEME SPACING AROUND DASHBOARD
   ========================================================= */

body:has(.adnex-dashboard-wrapper) .site-main,
body:has(.adnex-dashboard-wrapper) .elementor,
body:has(.adnex-dashboard-wrapper) .elementor-section,
body:has(.adnex-dashboard-wrapper) .elementor-container,
body:has(.adnex-dashboard-wrapper) .elementor-widget-wrap {
    box-sizing: border-box;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

    .adnex-dashboard-wrapper {
        flex-direction: column !important;
    }

    .adnex-dashboard-sidebar {
        width: 100%;
        min-width: 0;

        min-height: auto;

        flex: none;

        border-right: 0;
        border-bottom: 1px solid #e8edf0;
    }

    .adnex-dashboard-logo {
        height: 45px;
    }

    .adnex-dashboard-logo strong,
    .adnex-dashboard-logo span {
        line-height: 45px;
    }

    .adnex-dashboard-navigation {
        flex-direction: row;

        overflow-x: auto;

        padding: 7px;
    }

    .adnex-dashboard-navigation a {
        flex: 0 0 auto;

        width: auto;

        padding: 0 10px;
    }

    .adnex-dashboard-content {
        width: 100%;
        min-height: auto;

        padding: 16px 12px;
    }

    .adnex-add-listing-page {
        max-width: 100%;
    }

    .adnex-listing-form {
        padding: 15px;
    }

    .adnex-form-grid {
        grid-template-columns: 1fr;
    }

    .adnex-form-group-full {
        grid-column: auto;
    }

    .adnex-form-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .adnex-form-actions {
        width: 100%;
    }

    .adnex-form-actions > * {
        flex: 1;
    }
}