
/* =========================================================
   CRAFT SPACE STUDIOS
   NOTIFICATION BELL AND HISTORY
   ========================================================= */

.nav-notification {
    position: relative;
    display: flex;
    flex: 0 0 auto;
    z-index: 20;
}

/* Hide until JavaScript places the bell in the navbar */
.nav-notification:not(.is-mounted) {
    display: none !important;
}

/* =========================================================
   BELL BUTTON
   ========================================================= */

.nav-notification-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(116, 67, 46, .26);
    border-radius: 50%;
    background: transparent;
    color: #74432e;
    cursor: pointer;
    transition: background-color .2s ease;
}

.nav-notification-toggle:hover,
.nav-notification-toggle:focus-visible {
    background: #f0e6dc;
    transform: none;
}

.nav-notification-toggle:focus-visible {
    outline: 2px solid #a16b50;
    outline-offset: 3px;
}

.nav-notification-count {
    position: absolute;
    top: -5px;
    right: -7px;
    min-width: 19px;
    height: 19px;
    padding: 2px 4px;
    border-radius: 12px;
    background: #87482d;
    color: #fff;
    font: 700 11px/15px sans-serif;
    text-align: center;
}

.nav-notification-mobile-label {
    display: none;
}

/* =========================================================
   NOTIFICATION DROPDOWN
   ========================================================= */

.nav-notification-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 12px);
    width: min(370px, calc(100vw - 32px));
    max-height: min(540px, calc(100vh - 105px));
    overflow-y: auto;
    padding: 0;
    background: #fbf8f1;
    color: #29251f;
    border: 1px solid #dacfc3;
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(40, 28, 20, .20);
    z-index: 10001;
    font-size: 14px;
    text-align: left;
}

.nav-notification-panel[hidden] {
    display: none !important;
}

.nav-notification-heading,
.nav-notification-footer {
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.nav-notification-heading {
    border-bottom: 1px solid #e3dbd3;
}

.nav-notification-heading strong {
    font-size: 16px;
}

.nav-notification-heading small {
    color: #8b5438;
    white-space: nowrap;
}

.nav-notification-items {
    max-height: 355px;
    overflow-y: auto;
}

.nav-notification-item-form {
    display: block;
    margin: 0;
}

.nav-notification-item {
    display: block;
    width: 100%;
    padding: 13px 16px;
    border: 0;
    border-bottom: 1px solid #eee6dd;
    border-radius: 0;
    background: transparent;
    color: #342921;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.nav-notification-item:hover {
    background: #f3e9e0;
}

.nav-notification-item.is-unread {
    background: #f5eee5;
    border-left: 3px solid #9c6648;
    padding-left: 13px;
}

.nav-notification-item-message {
    display: block;
    font-weight: 600;
    line-height: 1.4;
}

.nav-notification-item-meta {
    display: block;
    font-size: 12px;
    color: #786b5f;
    line-height: 1.5;
    margin-top: 5px;
}

.nav-notification-empty {
    padding: 22px 16px;
    margin: 0;
    text-align: center;
    color: #746d62;
}

.nav-notification-footer {
    border-top: 1px solid #e3dbd3;
}

.site-header .dropdown-menu .nav-notification-history,
.login-header .login-dropdown-menu .nav-notification-history {
    padding: 0;
    font-size: 13px;
    color: #87482d;
    text-decoration: underline;
    font-weight: 700;
}

.nav-notification-read-form {
    margin: 0;
}

.nav-notification-read-form button {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    font-size: 13px;
    color: #74432e;
    cursor: pointer;
}

/* =========================================================
   BELL RING ANIMATION
   ========================================================= */

@keyframes notification-ring {
    0%, 100% {
        transform: rotate(0deg);
    }

    12%, 36% {
        transform: rotate(12deg);
    }

    24%, 48% {
        transform: rotate(-12deg);
    }

    60% {
        transform: rotate(0deg);
    }
}

.nav-notification-toggle.has-unread svg {
    transform-origin: 50% 10%;
    animation: notification-ring 3s ease-in-out 2;
}

@media (prefers-reduced-motion: reduce) {
    .nav-notification-toggle.has-unread svg {
        animation: none;
    }
}

/* =========================================================
   DESKTOP NAVIGATION
   ========================================================= */

@media (min-width: 1280px) {

    .site-header .menu,
    .login-header .login-menu {
        position: static;
    }

    .site-header .nav-notification,
    .login-header .nav-notification {
        position: absolute;
        right: calc(max(28px, 6.5vw) + 124px);
        top: 50%;
        transform: translateY(-50%);
        margin: 0;
    }

}

/* =========================================================
   SMALL DESKTOP
   ========================================================= */

@media (max-width: 1279px) and (min-width: 1000px) {

    .site-header .nav-notification,
    .login-header .nav-notification {
        margin-left: 8px;
    }

    .site-header .nav-notification-toggle,
    .login-header .nav-notification-toggle {
        width: 38px;
        height: 38px;
    }

}

/* =========================================================
   MOBILE / TABLET
   ========================================================= */

@media (max-width: 999px) {

    .site-header .nav-notification,
    .login-header .nav-notification {
        width: 100%;
        flex-direction: column;
    }

    .site-header .nav-notification-toggle,
    .login-header .nav-notification-toggle {
        width: 100%;
        height: 46px;
        border-radius: 10px;
        justify-content: flex-start;
        align-items: center;
        padding: 0 14px;
        gap: 8px;
    }

    .site-header .nav-notification-toggle svg,
    .login-header .nav-notification-toggle svg {
        order: 1;
        flex: 0 0 auto;
    }

    .nav-notification-mobile-label {
        display: inline;
        order: 2;
        font-weight: 600;
        line-height: 1;
        margin: 0;
    }

    .nav-notification-count {
        position: static;
        order: 3;
        margin-left: 4px;
        min-width: 20px;
        height: 20px;
        padding: 0 6px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
        vertical-align: middle;
    }

    .nav-notification-panel {
        width: min(370px, calc(100vw - 32px));
        right: 0;
        top: calc(100% + 6px);
    }

}
/* =========================================================
   NOTIFICATION HISTORY PAGE
   ========================================================= */

.notification-history-page {
    min-height: calc(100vh - 160px);
    width: min(960px, calc(100% - 32px));
    margin: 36px auto 65px;
    color: #30261e;
}

.notification-history-heading {
    padding: 28px 32px;
    background: #fbf8f1;
    border-radius: 14px;
}

.notification-history-eyebrow {
    letter-spacing: .18em;
    font-weight: 700;
    font-size: 12px;
    color: #8e5d45;
}

.notification-history-heading h1 {
    margin: 10px 0;
    font-family: Georgia, serif;
    font-size: clamp(34px, 5vw, 55px);
    color: #5b2d1a;
}

.notification-history-heading p {
    color: #756a60;
}

.notification-history-back {
    color: #74432e;
    text-decoration: underline;
}

.notification-history-content {
    margin-top: 18px;
    padding: 22px 30px;
    background: #fbf8f1;
    border-radius: 14px;
}

.notification-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.notification-history-header h2 {
    margin: 0;
    font-size: 21px;
}

.notification-history-header form,
.notification-history-content form {
    margin: 0;
}

.notification-history-mark-all {
    padding: 9px 12px;
    background: #75432e;
    border: 0;
    border-radius: 7px;
    color: white;
    cursor: pointer;
}

.notification-history-row {
    display: flex;
    gap: 12px;
    width: 100%;
    align-items: center;
    padding: 20px 8px;
    border: 0;
    border-bottom: 1px solid #e4dad1;
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
    color: #29251f;
}

.notification-history-row:hover {
    background: #f6ede4;
}

.notification-history-row.is-unread {
    background: #f7f0e7;
}

.notification-history-status {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex: 0 0 9px;
    background: #d2cbc3;
}

.notification-history-row.is-unread
.notification-history-status {
    background: #a36843;
}

.notification-history-text {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    gap: 5px;
}

.notification-history-text strong {
    font-size: 15px;
}

.notification-history-text small {
    color: #807267;
}

.notification-history-go {
    color: #7b4932;
    white-space: nowrap;
}

.notification-history-pages {
    display: flex;
    gap: 12px;
    justify-content: center;
    padding: 20px 0;
}

.notification-history-pages a {
    color: #74432e;
}

.notification-history-empty {
    margin: 28px 0;
    text-align: center;
    color: #756a60;
}

@media (max-width: 600px) {

    .notification-history-heading,
    .notification-history-content {
        padding: 20px;
    }

    .notification-history-go {
        display: none;
    }

}

/* =========================================================
   HIDE OLD PROVIDER NOTIFICATION PANEL

   Preserve the existing dashboard.php without requiring
   users to replace that very large template.
   ========================================================= */

.provider-shell > .provider-notifications {
    display: none !important;
}


/* =========================================================
   NOTIFICATION HISTORY - UNDERLINE ONLY ON HOVER/FOCUS
   ========================================================= */
.notification-history-back {
    text-decoration: none;
    text-underline-offset: 4px;
    transition: color 0.2s ease;
}

.notification-history-back:hover,
.notification-history-back:focus-visible {
    color: #5b2d1a;
    text-decoration: underline;
}

/* =========================================================
   CUSTOMER + PROVIDER NOTIFICATION STYLE CONSISTENCY

   bookings.css sets a brown background, white text and
   uppercase lettering on all submit buttons via:
       body button[type="submit"]

   Notification actions are submit buttons too. These more
   specific selectors keep the provider-style dropdown on
   customer pages without changing booking form buttons.
   ========================================================= */

body .nav-notification-panel .nav-notification-item-form button.nav-notification-item[type="submit"] {
    display: block;
    width: 100%;
    margin: 0;
    padding: 13px 16px;
    border: 0;
    border-bottom: 1px solid #eee6dd;
    border-radius: 0;
    background: transparent;
    color: #342921;
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: normal;
    letter-spacing: normal;
    text-transform: none;
    text-align: left;
    box-shadow: none;
    transform: none;
    cursor: pointer;
}

body .nav-notification-panel .nav-notification-item-form button.nav-notification-item.is-unread[type="submit"] {
    padding-left: 13px;
    border-left: 3px solid #9c6648;
    background: #f5eee5;
    color: #342921;
}

body .nav-notification-panel .nav-notification-item-form button.nav-notification-item[type="submit"]:hover,
body .nav-notification-panel .nav-notification-item-form button.nav-notification-item[type="submit"]:focus-visible {
    background: #f3e9e0;
    color: #342921;
    box-shadow: none;
    transform: none;
}

body .nav-notification-panel .nav-notification-item-form button.nav-notification-item[type="submit"]:focus-visible {
    outline: 2px solid #9c6648;
    outline-offset: -2px;
}

body .nav-notification-panel .nav-notification-read-form button[type="submit"] {
    display: inline;
    width: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #74432e;
    font-family: inherit;
    font-size: 13px;
    font-weight: 400;
    line-height: inherit;
    letter-spacing: normal;
    text-transform: none;
    text-align: left;
    box-shadow: none;
    transform: none;
    cursor: pointer;
}

body .nav-notification-panel .nav-notification-read-form button[type="submit"]:hover,
body .nav-notification-panel .nav-notification-read-form button[type="submit"]:focus-visible {
    border: 0;
    background: transparent;
    color: #5b2d1a;
    text-decoration: underline;
    text-underline-offset: 3px;
    box-shadow: none;
    transform: none;
}


/* =========================================================
   NOTIFICATION HISTORY PAGINATION
   ========================================================= */

.notification-history-pages {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 24px 0 8px;
    list-style: none;
}

/* Previous / Next controls */

.notification-history-pages
.notification-pagination-control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;

    min-height: 40px;
    padding: 8px 12px;

    border: 1px solid transparent;
    border-radius: 8px;

    background: transparent;
    color: #74432e;

    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;

    transition:
        background-color .2s ease,
        color .2s ease;
}

/* Arrow icons */

.notification-history-pages
.notification-pagination-control svg {
    display: block;
    flex: 0 0 16px;

    width: 16px;
    height: 16px;

    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Available navigation - hover */

.notification-history-pages
a.notification-pagination-control:hover {
    background: #f3e9e0;
    color: #5b2d1a;
    text-decoration: none;
}

/* Keyboard focus */

.notification-history-pages
a.notification-pagination-control:focus-visible {
    outline: 2px solid #a16b50;
    outline-offset: 2px;
    background: #f3e9e0;
}

/* Disabled navigation */

.notification-history-pages
.notification-pagination-control.is-disabled {
    color: #a8a19a;
    cursor: default;
    pointer-events: none;
    user-select: none;
}

/* Page counter */

.notification-history-pages
.notification-pagination-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 95px;
    padding: 8px 5px;

    color: #756a60;
    font-size: 13px;
    line-height: 1.3;
    white-space: nowrap;
}

/* Mobile layout */

@media (max-width: 480px) {

    .notification-history-pages {
        gap: 2px;
        padding-top: 18px;
    }

    .notification-history-pages
    .notification-pagination-control {
        gap: 3px;
        padding: 8px 6px;
        font-size: 13px;
    }

    .notification-history-pages
    .notification-pagination-current {
        min-width: 80px;
        padding: 8px 2px;
        font-size: 12px;
    }

}

/* =====================================================
   NOTIFICATION HISTORY - HEADER SPACING
   ===================================================== */

.notification-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    /* Space between header/button and first notification */
    margin-bottom: 22px;
}

/* Mobile adjustment */
@media (max-width: 600px) {
    .notification-history-header {
        margin-bottom: 16px;
    }
}

