/* =========================================================
   SITE BUTTONS
   ========================================================= */

.site-text-btn,
.site-icon-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid rgba(255, 248, 234, 0.22);
    border-radius: 10px;
    background: #633523;
    color: #d7ad6b;
    font-family: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.site-text-btn {
    padding: 10px 20px;
    font-size: 15px;
    white-space: nowrap;
}

.site-icon-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    flex-shrink: 0;
    font-size: 20px;
    line-height: 1;
}

    .site-text-btn i,
    .site-icon-btn i {
        pointer-events: none;
    }

.site-text-btn i {
    font-size: 18px;
}

.site-icon-btn i {
    line-height: 1;
}

.site-icon-green {
    color: #70d59a !important;
}

.site-icon-red {
    color: #f08080 !important;
}

.site-icon-orange {
    color: #ffbd70 !important;
}

.site-icon-dice {
    color: #fff7eb !important;
}

@media (hover: hover) {
    .site-text-btn:not(:disabled):not(.disabled):hover,
    .site-icon-btn:not(:disabled):not(.disabled):hover {
        background: #ad7954;
        border-color: #e5bb70;
        color: #fff8ea;
        transform: translateY(-2px);
    }
}

.site-text-btn:not(:disabled):not(.disabled):active,
.site-icon-btn:not(:disabled):not(.disabled):active {
    background: #805238;
    border-color: #e5bb70;
    color: #fff8ea;
    transform: scale(0.95);
}

.site-text-btn:focus-visible,
.site-icon-btn:focus-visible {
    background: #ad7954;
    border-color: #e5bb70;
    color: #fff8ea;
    outline: 2px solid #e5bb70;
    outline-offset: 2px;
}

.site-text-btn:disabled,
.site-icon-btn:disabled,
.site-text-btn.disabled,
.site-icon-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}


/* =========================================================
   SITE MODAL
   ========================================================= */

.site-modal,
.play-game-modal {
    --bs-modal-width: 510px;
}

    .site-modal .modal-content,
    .play-game-modal .modal-content {
        background: #f6ead6;
        color: #3f2417;
        border: 1px solid #ad865c;
        border-radius: 18px;
        box-shadow: 0 22px 60px rgba(40, 23, 12, 0.35);
    }

.site-modal-header,
.play-game-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 19px 22px;
    border-bottom: 1px solid #d9c4a6;
}

.site-modal-kicker,
.play-game-kicker {
    color: #92613a;
    font-size: 0.63rem;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.site-modal-header .modal-title,
.play-game-header .modal-title {
    font-size: 1.2rem;
    font-weight: 800;
}

.site-modal-actions,
.play-game-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.site-modal-body,
.play-game-body {
    position: relative;
    padding: 20px;
}


@media (max-width: 768px) {
    #siteAlertModal .modal-dialog {
        width: calc(100% - 24px);
        max-width: none;
        margin: 12px auto;
    }

    #siteAlertModal .modal-content {
        border-radius: 12px;
    }
}

/* =========================================================
   SITE POPOVER
   ========================================================= */

.site-popover,
.play-game-settings-popover {
    --bs-popover-max-width: 352px;
    --bs-popover-bg: #fffdf8;
    --bs-popover-border-color: rgba(93, 65, 43, 0.12);
    --bs-popover-border-radius: 18px;
    --bs-popover-body-padding-x: 0;
    --bs-popover-body-padding-y: 0;
    width: min(352px, calc(100vw - 24px));
    z-index: 1090;
    border: 1px solid rgba(93, 65, 43, 0.12);
    box-shadow: 0 22px 60px rgba(36, 25, 16, 0.22), 0 2px 8px rgba(36, 25, 16, 0.06);
    overflow: visible;
}

    .site-popover .popover-arrow::before,
    .play-game-settings-popover .popover-arrow::before {
        border-bottom-color: rgba(93, 65, 43, 0.12);
    }

    .site-popover .popover-body,
    .play-game-settings-popover .popover-body {
        color: #33271f;
    }

.site-popover-content,
.play-game-settings {
    padding: 20px;
    color: #33271f;
    background: linear-gradient(160deg, #fffdf8, #fff8ee);
    border-radius: 18px;
}

.site-popover-heading,
.play-game-settings-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 17px;
    border-bottom: 1px solid #ebdfcd;
}

.site-popover-mark,
.play-game-settings-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    border-radius: 13px;
    color: #fff9ed;
    background: linear-gradient(145deg, #986340, #5d3827);
    box-shadow: 0 5px 12px rgba(92, 56, 39, 0.2);
    font-size: 17px;
}

.site-popover-title,
.play-game-settings-title {
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.2px;
}

.site-popover-description,
.play-game-settings-description {
    margin-top: 3px;
    font-size: 11px;
    color: #87715e;
}


/* =========================================================
   SITE FORM ELEMENTS
   ========================================================= */

.site-form-label,
.play-game-label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #5c4536;
}

.site-form-select,
.play-game-settings .form-select {
    min-height: 43px;
    border: 1px solid #e2d4c1;
    border-radius: 10px;
    background-color: #fff;
    color: #39291e;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(64, 42, 26, 0.03);
}

    .site-form-select:focus,
    .play-game-settings .form-select:focus {
        border-color: #aa8059;
        box-shadow: 0 0 0 3px rgba(170, 128, 89, 0.14);
    }

.site-switch-row,
.play-game-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 13px;
    border: 1px solid #e9ddcd;
    border-radius: 12px;
    background: #f8f0e4;
}

    .site-switch-row strong,
    .play-game-switch-row strong {
        display: block;
        color: #463327;
        font-size: 12px;
        font-weight: 800;
    }

    .site-switch-row small,
    .play-game-switch-row small {
        display: block;
        margin-top: 3px;
        font-size: 10px;
        line-height: 1.45;
        color: #866f5b;
    }

    .site-switch-row .form-check-input,
    .play-game-switch-row .form-check-input {
        width: 35px;
        height: 19px;
        margin: 0;
        cursor: pointer;
    }

        .site-switch-row .form-check-input:checked,
        .play-game-settings .form-check-input:checked {
            background-color: #355846;
            border-color: #355846;
        }


/* ==========================================
   SITE DROPDOWN
========================================== */

.site-dropdown {
    position: relative;
    width: 100%;
    font-family: inherit;
}

.site-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid #a88755;
    border-radius: 8px;
    background: #fffdf8;
    color: #65452e;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color .2s, background-color .2s;
}

    .site-dropdown-toggle:hover {
        background: #efe0c6;
        border-color: #65452e;
    }

    .site-dropdown-toggle:focus-visible {
        outline: 2px solid #a88755;
        outline-offset: 2px;
    }

.site-dropdown-value {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    color: #9b826d;
    font-size: 1rem;
    font-weight: 400;
}

.site-dropdown-toggle > .fa-chevron-down {
    font-size: 12px;
    color: #a88755;
    transition: transform .2s;
}

.site-dropdown.site-dropdown-open
.site-dropdown-toggle > .fa-chevron-down {
    transform: rotate(180deg);
}

/* Menu */

.site-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    min-width: 220px;
    z-index: 1065;
    padding: 6px;
    border: 1px solid #a88755;
    border-radius: 8px;
    background: #fbf7ef;
    box-shadow: 0 8px 22px rgba(55, 35, 18, .15);
}

.site-dropdown.site-dropdown-open .site-dropdown-menu {
    display: block;
}

/* Search */

.site-dropdown-search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 5px;
    border: 1px solid #d6bea0;
    border-radius: 6px;
    background: #fffaf2;
    color: #a88755;
}

    .site-dropdown-search:focus-within {
        border-color: #a88755;
    }

    .site-dropdown-search > i {
        font-size: 13px;
    }

    .site-dropdown-search input {
        width: 100%;
        min-width: 0;
        border: none;
        outline: none;
        background: transparent;
        color: #65452e;
        font: inherit;
        font-size: 14px;
    }

        .site-dropdown-search input::placeholder {
            color: #9b826d;
        }

/* Options */

.site-dropdown-list {
    max-height: 240px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.site-dropdown-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #65452e;
    font: inherit;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: background-color .15s;
}

    .site-dropdown-option:hover,
    .site-dropdown-option:focus-visible {
        background: #eee0c9;
        outline: none;
    }

    .site-dropdown-option.site-dropdown-selected {
        background: #e8d5b5;
        font-weight: 600;
    }

    .site-dropdown-option small {
        margin-left: auto;
        color: #9b826d;
        font-size: 11px;
    }

/* extension  */

.site-dropdown .fi {
    display: inline-block;
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    box-shadow: 0 0 0 1px rgba(101, 69, 46, .15);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 576px) {
    .site-modal-header,
    .play-game-header {
        padding: 15px;
    }

    .site-modal-body,
    .play-game-body {
        padding: 14px;
    }
}

@media (max-width: 390px) {
    .site-popover-content,
    .play-game-settings {
        padding: 15px;
    }
}




/* ==========================================
   NOTIFICATION POPOVER
========================================== */

.site-notification-popover {
    --bs-popover-max-width: 260px;
    --bs-popover-bg: #f5ead7;
    --bs-popover-border-color: #a88755;
    --bs-popover-body-padding-x: 0;
    --bs-popover-body-padding-y: 0;
    width: 260px;
    border-radius: 9px;
    box-shadow: 0 8px 22px rgba(55, 35, 18, 0.18);
    z-index: 1180;
}

    .site-notification-popover .popover-body {
        padding: 0;
    }

.site-notification-message {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    color: #65452e;
    cursor:pointer;
}

    .site-notification-message > i {
        margin-top: 2px;
        font-size: 18px;
    }

    .site-notification-message strong {
        display: block;
        margin-bottom: 4px;
        font-size: 13px;
        font-weight: 700;
    }

    .site-notification-message p {
        margin: 0;
        color: #78634e;
        font-size: 12px;
        line-height: 1.5;
    }
