/**
 * Post AD
 *
 * Post Ad page stylesheet.
 *
 * @package Post_AD
 */


/* =========================================
   Main Page
========================================= */

.post-ad-page {
    width: 100%;
    max-width: 560px;

    margin: 0 auto;

    padding: 35px 16px 40px;

    box-sizing: border-box;
}


/* =========================================
   Highlight Box
========================================= */

.post-ad-box {
    width: 100%;

    padding: 16px;

    box-sizing: border-box;

    background: #ffffff;

    border: 1.5px solid #05BA1B;

    border-radius: 9px;

    box-shadow:
        0 5px 18px rgba(5, 186, 27, 0.10);
}


/* =========================================
   Buttons
========================================= */

.post-ad-button {
    width: 100%;

    min-height: 66px;

    display: flex;

    align-items: center;

    box-sizing: border-box;

    padding: 10px 12px;

    background: #ffffff;

    border: 1px solid #dcefe0;

    border-radius: 8px;

    text-decoration: none;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}


/* Space between buttons */

.post-ad-button + .post-ad-button {
    margin-top: 10px;
}


/* =========================================
   Hover
========================================= */

.post-ad-button:hover {
    background: #fafffb;

    border-color: #05BA1B;

    box-shadow:
        0 4px 13px rgba(5, 186, 27, 0.10);

    transform: translateY(-1px);

    text-decoration: none;
}


/* =========================================
   Button Icon
========================================= */

.post-ad-button-icon {
    width: 40px;
    height: 40px;

    flex: 0 0 40px;

    display: flex;

    align-items: center;
    justify-content: center;

    background: #eaf9ed;

    border-radius: 7px;

    font-size: 19px;

    line-height: 1;
}


/* =========================================
   Button Content
========================================= */

.post-ad-button-content {
    min-width: 0;

    flex: 1;

    display: flex;

    flex-direction: column;

    margin-left: 11px;
}


/* =========================================
   Button Title
========================================= */

.post-ad-button-title {
    color: #1f2937;

    font-size: 14px;

    line-height: 1.3;

    font-weight: 700;
}


/* =========================================
   Button Description
========================================= */

.post-ad-button-description {
    margin-top: 3px;

    color: #667085;

    font-size: 11px;

    line-height: 1.3;

    font-weight: 400;
}


/* =========================================
   Arrow
========================================= */

.post-ad-button-arrow {
    margin-left: 10px;

    color: #05BA1B;

    font-size: 20px;

    line-height: 1;

    font-weight: 600;

    transition:
        transform 0.2s ease;
}


.post-ad-button:hover .post-ad-button-arrow {
    transform: translateX(3px);
}


/* =========================================
   Mobile
========================================= */

@media (max-width: 600px) {

    .post-ad-page {
        padding: 25px 14px 30px;
    }

    .post-ad-box {
        padding: 12px;

        border-radius: 8px;
    }

    .post-ad-button {
        min-height: 60px;

        padding: 9px 10px;

        border-radius: 7px;
    }

    .post-ad-button + .post-ad-button {
        margin-top: 8px;
    }

    .post-ad-button-icon {
        width: 36px;
        height: 36px;

        flex-basis: 36px;

        font-size: 17px;
    }

    .post-ad-button-content {
        margin-left: 9px;
    }

    .post-ad-button-title {
        font-size: 13px;
    }

    .post-ad-button-description {
        font-size: 10.5px;
    }

    .post-ad-button-arrow {
        font-size: 18px;

        margin-left: 8px;
    }
}

/* Owner-only pending ad search, without altering the original menu card. */
.post-ad-page { max-width: 1060px; }
.post-ad-box { max-width: 560px; margin: 0 auto; }
.post-ad-view-toggle { font: inherit; cursor: pointer; text-align: left; }
.post-ad-view-toggle:focus-visible { outline: 3px solid #14b867; outline-offset: 3px; }
.post-ad-search-panel[hidden] { display: none !important; }
.post-ad-search-panel { max-width: 1020px; margin: 28px auto 0; }
.post-ad-search-header { max-width: 800px; margin: 0 auto; text-align: center; }
.post-ad-search-tag { display: inline-block; background: #e8fff2; color: #087b50; border-radius: 50px; padding: 6px 13px; font-size: 12px; font-weight: 700; }
.post-ad-search-header h2 { font-size: clamp(22px,3vw,30px); font-weight: 800; margin: 12px 0 6px; color: #13233b; }
.post-ad-search-header p { margin: 0 0 19px; color: #617088; font-size: 14px; }
.post-ad-search-form { max-width: 800px; border: 1px solid #b9edd1; box-shadow: 0 8px 28px rgba(4,126,76,.08); border-radius: 17px; padding: clamp(17px,3vw,26px); background: #fff; margin: 0 auto 22px; }
.post-ad-search-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.post-ad-search-grid label { min-width: 0; display:flex; flex-direction:column; gap: 8px; color: #152841; font-weight: 750; font-size: 13px; }
.post-ad-search-grid input { width: 100%; box-sizing: border-box; height: 49px; border: 1px solid #b9d9cb; background: #fafffc; color: #152841; border-radius: 10px; padding: 10px 13px; outline: none; font: inherit; font-weight: 500; font-size: 14px; }
.post-ad-search-grid input:focus { border-color: #0ca765; box-shadow: 0 0 0 3px rgba(0,171,98,.13); }
.post-ad-search-submit { display: flex; align-items:center; justify-content:center; gap: 9px; margin: 22px auto 0; border: 0; background: linear-gradient(115deg, #18d27a, #039d63); color: white; min-height: 47px; padding: 12px 45px; font-size: 15px; font-weight: 800; border-radius: 11px; cursor: pointer; box-shadow:0 7px 18px rgba(0,166,96,.14); }
.post-ad-search-submit:hover { filter: brightness(.96); }
.post-ad-search-submit:focus-visible { outline: 3px solid #084c37; outline-offset: 3px; }
.post-ad-search-results { scroll-margin-top: 120px; }
.post-ad-search-error { max-width: 800px; padding: 15px 18px; border: 1px solid #f0c8c8; color: #a73232; background:#fff7f7; border-radius:12px; margin: 0 auto; text-align:center; }
@media (max-width: 600px) {
  .post-ad-search-panel { margin-top: 20px; }
  .post-ad-search-grid { grid-template-columns: minmax(0,1fr); gap: 15px; }
  .post-ad-search-form { padding: 16px; }
  .post-ad-search-header h2 { font-size: 23px; }
  .post-ad-search-submit { width:100%; }
}


/* v1.1.2: keep the owner menu and Search button in the RHMP green theme.
   The WordPress theme otherwise supplies a blue button hover/focus style. */
.post-ad-page button#post-ad-view-ads.post-ad-button {
    appearance: none;
    -webkit-appearance: none;
    background: #ffffff !important;
    border-color: #dcefe0 !important;
    color: #1f2937 !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: rgba(12, 184, 104, .12);
}
.post-ad-page button#post-ad-view-ads.post-ad-button:is(:hover, :focus, :focus-visible, :active, [aria-expanded="true"]) {
    background: #e9fbf1 !important;
    border-color: #10b66b !important;
    color: #1f2937 !important;
    box-shadow: 0 5px 16px rgba(0, 163, 94, .13) !important;
}
.post-ad-page button#post-ad-view-ads .post-ad-button-title {
    color: #1f2937 !important;
}
.post-ad-page button#post-ad-view-ads .post-ad-button-description {
    color: #586878 !important;
}
.post-ad-page button#post-ad-view-ads .post-ad-button-icon {
    background-color: #eaf9ed !important;
}
.post-ad-page button#post-ad-view-ads .post-ad-button-arrow {
    color: #06af61 !important;
}
.post-ad-page button#post-ad-view-ads:focus-visible {
    outline: 2px solid #0eae66 !important;
    outline-offset: 3px;
}
.post-ad-page button.post-ad-search-submit,
.post-ad-page button.post-ad-search-submit:is(:hover, :focus, :focus-visible, :active) {
    background: linear-gradient(115deg, #18d27a, #039d63) !important;
    border: 0 !important;
    color: #ffffff !important;
    box-shadow: 0 7px 18px rgba(0,166,96,.14) !important;
}
.post-ad-page button.post-ad-search-submit:focus-visible {
    outline: 2px solid #0eae66 !important;
    outline-offset: 3px;
}

/* Matches the existing menu cards; no additional blue interactive styling. */
.post-ad-page a.post-ad-terms-link{background:#fff!important;border-color:#dcefe0!important;color:#1f2937!important;text-decoration:none!important}
.post-ad-page a.post-ad-terms-link:hover,.post-ad-page a.post-ad-terms-link:focus-visible{background:#e9fbf1!important;border-color:#10b66b!important;box-shadow:0 5px 16px rgba(0,163,94,.13)!important}
.post-ad-page a.post-ad-terms-link .post-ad-button-arrow{color:#06af61!important}
.post-ad-page a.post-ad-terms-link:focus-visible{outline:2px solid #0eae66!important;outline-offset:3px}
