@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --gradient: linear-gradient(90deg, #F46B45, #FFB34C);
    --main-colour: #252932;
}

html {
    line-height: normal;
}

body {
    font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    margin: 0;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* Apply Poppins to common interactive elements as well */
button, input, select, textarea {
    font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

p {
    margin: 0;
}

a {
    appearance: none;
    text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
}

.page-container {
    display: flex;
    background-color: rgb(37, 41, 50);
    /* padding-top: 6px; */
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
}

.sidebar {
    /* background-color: rgb(24, 24, 24); */
    /* border-right: 1px solid lightgray; */
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 240px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: rgb(37, 41, 50);
}

/* removed empty .sidemenu ruleset */
.sidemenu {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.logo-container {
    /* background-color: rgb(72, 85, 187); */
    padding: 0 20px;
    padding-top: 15px;
    margin-bottom: 20px;
}

.logo-container h3 {
    margin-left: 10px;
    font-weight: 600;
    font-size: 20px;
    /* color: rgb(41, 41, 40); */
    color: rgb(44, 44, 44);
}

.gym-container {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 14px 10px;
    background-color: rgba(88, 88, 88, 0.624);
    border-radius: 12px;
    padding: 5px;
    gap: 0 10px;
    cursor: pointer;
}

.gym-container:hover {
    background-color: rgba(88, 88, 88, 0.8);
}

.gym-logo {
    width: 32px;
    height: 32px;
    font-size: 18px;
    font-weight: 500;
    color: #222222;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, #d53369 0%, #daae51 100%);
    overflow: hidden;
    position: relative;
}

.gym-name {
    font-size: 14px;
    color: #f4f4f4;
    letter-spacing: 0.3;
    flex-grow: 1;
}

.gym-selection {
    position: absolute;
    width: 200px;
    padding: 10px;
    background-color: rgb(80, 80, 100);
    /* visibility: hidden; */
    opacity: 1;
    display: none;
    top: 0;
    transform: translateY(45px);
    animation: slow-appear ease 0.2s;
    border-radius: 10px;
}

@keyframes slow-appear {
    0% {
        opacity: 0;
        transform: translateY(35px);
    }

    100% {
        opacity: 1;
        transform: translateY(45px);
    }
}

.gym-selection.shown {
    /* top: 45px;
    visibility: visible;
    opacity: 1; */
    display: block;
}

.selection-container {
    display: flex;
    align-items: center;
    gap: 0 10px;
    margin-bottom: 10px;
    border-radius: 10px;
    padding: 4px;
}

.selection-container:hover {
    background-color: rgb(48, 48, 61);
}

.gym-details {
    flex-grow: 1;
}

.gym-details p.gym-name {
    font-size: 13px;
    color: #f5f5f5;
}

.gym-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.gym-logo span {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fdfdfd;
    font-weight: 600;
}

.gym-logo.has-image img {
    display: block;
}

.gym-logo.has-image span {
    display: none;
}

.gym-status {
    font-size: 11px;
    color: #b5b5b5;
}

.checkmark-icon {
    width: 15px;
    height: 15px;
}

.list-icon {
    width: 24px;
    height: 24px;
}

.link-title {
    font-size: 13px;
}

.main-content {
    background-color: rgb(249, 250, 251);
    padding: 0 20px 0 20px;
    flex-grow: 1;
    border-top-left-radius: 8px;
    margin-top: 8px;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    margin-left: 240px;
}

.menu-container {
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.menu-pages {
    width: 200px;
    padding-bottom: 1rem;
}

.menu-title {
    font-size: 12px;
    color: rgb(238, 238, 238);
    margin-top: 20px;
    margin-bottom: 15px;
    padding-left: 5px;
}

/* Prevent accidental text selection when tapping sidebar items on mobile */
.sidebar {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.link-container {
    margin-top: 6px;
    padding: 7px 10px;
    border-radius: 10px;
    border: 1px solid transparent;
    color: rgb(180, 180, 180);
    display: flex;
    align-items: center;
    gap: 0 8px;
    font-weight: 400;
}

.link-container img {
    width: 16px;
    height: 16px;
}

.link-container:hover {
    /* background-color: rgb(242, 242, 242); */
    color: rgb(234, 107, 60);
}

.menu-pages .active {
    /* background-color: rgb(217, 233, 124);
    border: 1px solid rgb(200, 228, 37); */
    border: 1px solid rgb(77, 81, 89);
    background-color: rgb(61, 64, 70);
    color: #fdfdfd;
    /* box-shadow: 0px 1px 5px 2px rgb(246, 246, 246); */
}

.action-links {
    font-size: 13px;
    max-width: 180px;
}

.action-container {
    display: inline-block;
    margin-top: 6px;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid transparent;
    background-color: rgb(1, 106, 126);
    color: rgb(244, 244, 244);
}

/* removed empty .action-title ruleset */

.menu-toogle {
    display: flex;
    align-items: center;
    justify-content: start;
    gap: 0 10px;
    padding: 0 15px;
    margin-top: 20px;
    cursor: pointer;
}

.menu-toogle img {
    width: 10px;
    height: 10px;
}

.menu-toogle p {
    font-size: 12px;
    color: rgb(149, 151, 154);
}

.menu-toogle p:hover {
    color: rgb(176, 178, 182);
}

.sidebar-bottom {
    margin-top: auto;
    padding: 0 0px 20px;
}

.sidebar-bottom .menu-pages {
    width: 100%;
}

.settings-link {
    position: relative;
    cursor: pointer;
}

.settings-link .settings-caret {
    width: 12px;
    height: 12px;
    margin-left: auto;
    filter: invert(1);
}

#logoutBtn .link-title {
    color: #c53030;
}

.language-link {
    cursor: pointer;
}

.lang-flag {
    width: 24px;
    height: 16px;
    object-fit: cover;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.flag-icon {
    display: inline-block;
    width: 24px;
    height: 16px;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.flag-gr {
    background: repeating-linear-gradient(180deg, #0d5eaf 0 2px, #ffffff 2px 4px);
}

.flag-gr::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 10px;
    height: 10px;
    background: #0d5eaf;
}

.flag-gr::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 10px;
    height: 10px;
    background:
        linear-gradient(90deg, transparent 3px, #ffffff 3px 5px, transparent 5px),
        linear-gradient(180deg, transparent 3px, #ffffff 3px 5px, transparent 5px);
}

.flag-en {
    background: #ffffff;
}

.flag-en::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, transparent 44%, #c8102e 44%, #c8102e 56%, transparent 56%),
        linear-gradient(45deg, transparent 44%, #c8102e 44%, #c8102e 56%, transparent 56%),
        linear-gradient(90deg, transparent 38%, #012169 38%, #012169 62%, transparent 62%),
        linear-gradient(180deg, transparent 38%, #012169 38%, #012169 62%, transparent 62%);
    background-size: 100% 100%;
    mix-blend-mode: multiply;
}

.top-bar {
    display: flex;
    align-items: center;
    gap: 0 10px
}

.top-bar .profile-options {
    display: flex;
    flex-grow: 1;
    justify-content: end;
    align-items: center;
    gap: 0 10px;
    padding: 10px 0;
}

.top-bar .page-title {
    font-size: 20px;
    font-weight: 400;
    color: rgb(36, 36, 36);
}

.search-box {
    width: 100%;
    margin-top: 10px;
    margin-bottom: 20px;
}

.search-box .search-input {
    width: 100%;
    padding: 8px 15px;
    font-size: 12px;
    background-color: rgb(99, 99, 99);
    border-color: transparent;
    border-radius: 6px;
}

/* .search-box input:focus ~ .search-label,
.search-box input:valid ~ .search-label  {
    top: -4;
    left: 6px;
} */

.clear-search {
    width: 12px;
    height: 12px;
}


.profile-btn {
    border: 1px solid #e1e1e1;
    gap: 0 5px;
    padding: 2px 5px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    transition: opacity ease 0.2s;
    cursor: pointer;
}

.staff-name {
    font-size: 13px;
    color: #101010;
}

.profile-btn .user-avatar {
    width: 40px;
    height: 40px;
}

.profile-btn .angle-arrow {
    width: 10px;
    height: 10px;
    margin-left: 10px;
}

.profile-btn:hover {
    opacity: 0.8;
}

.vertical-line {
    border-left: 1px solid rgb(182, 182, 182);
    height: 25px;
}

.settings {
    padding: 5px;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all ease 0.2s;
    position: relative;
}

/* .settings:hover {
    background-color: rgb(241, 241, 241);
    border-color: rgb(218, 218, 218);
} */

.notifications-icon {
    width: 18px;
    height: 18px;
    transition: all ease 0.4s;
}

.notifications-container {
    padding: 6px;
    border-radius: 50%;
    background-color: #eeeeee;
    border: 2px solid transparent;
    cursor: pointer;
}

.notifications-container:hover {
    border-color: #d8d8d8;
}

.help-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid #d8d8d8;
    background-color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    color: #016a7e;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.help-btn:hover {
    background-color: #f4f4f4;
    border-color: #c9c9c9;
}

.settings-icon {
    width: 18px;
    height: 18px;
    transition: all ease 0.4s;
}

.settings .settings-icon:hover {
    transform: rotate(120deg);
}

.settings-container {
    padding: 6px;
    border-radius: 50%;
    background-color: #eeeeee;
    border: 2px solid transparent;
}

.settings-container:hover {
    border-color: #d8d8d8;
}

.divider {
    width: 100%;
    border-top: 1px solid rgb(162, 162, 162);
    /* margin-top: 10px; */
}


.title-section {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
}

.title-section .filters {
    display: flex;
    gap: 0 10px;
    align-items: center;
}

.search-customer,
.search-class,
.search-exercise {
    /* align-self: stretch; */
    height: 100%;
    display: flex;
    font-size: 13px;
    color: rgb(79, 79, 79);
    background-color: rgb(240, 240, 240);
    border-radius: 6px;
    align-items: center;
    padding: 8px 8px 8px 0;
    gap: 8px;
    width: 150%;
    max-width: 800px;
}

.search-customer input,
.search-class input,
.search-exercise input {
    width: 100%;
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    padding-left: 10px;
    background-color: transparent;
}

.search-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.search-btn {
    align-self: center;
    background-color: rgb(245, 8, 99);
    padding: 7px;
    border-radius: 50%;
    box-shadow: 0px 1px 2px 2px rgb(231, 231, 231);
    transition: all ease 0.2s;
    cursor: pointer;
    margin: 0;
}

.search-btn:hover {
    box-shadow: 0px 1px 8px 4px rgb(221, 221, 221);
}

.search-btn img {
    width: 15px;
    height: 15px;
}

#filter-btn {
    position: relative;
}

.sort-by {
    display: flex;
    padding: 0 10px;
    justify-content: space-between;
    align-items: center;
    gap: 0 30px;
    background-color: white;
    border-radius: 6px;
    padding: 10px;
    font-size: 14px;
    border: 1px solid rgb(218, 218, 218);
    color: rgb(36, 36, 36);
    cursor: pointer;
    transition: all ease 0.2s;
}

.sort-by img {
    width: 10px;
    height: 10px;
}

.sort-by:hover {
    background-color: rgb(249, 249, 249);
}

#setting-options {
    position: absolute;
    width: 100%;
    min-width: 180px;
    max-width: 220px;
    top: calc(100% + 8px);
    left: 0;
    right: auto;
    z-index: 1000;
    border-radius: 6px;
    background-color: rgb(255, 255, 255);
    border: 1px solid rgb(237, 237, 237);
    box-shadow: 0px 1px 10px 2px rgba(249, 250, 251, 0.411);
    transition: all ease 0.2s;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
}

#setting-options.shown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#setting-options div {
    margin: 5px 0;
    padding: 7px 0;
    padding-left: 15px;
    font-size: 14px;
    color: rgb(78, 78, 78);
    cursor: pointer;
}

#setting-options div:hover {
    background-color: rgb(235, 235, 235);
}

#sort-options {
    position: absolute;
    width: 110%;
    top: 30px;
    left: 0;
    border-radius: 6px;
    background-color: rgb(255, 255, 255);
    border: 1px solid rgb(237, 237, 237);
    box-shadow: 0px 1px 10px 2px rgb(240, 240, 240);
    transition: all ease 0.2s;
    opacity: 0;
    visibility: hidden;
}

#sort-options.shown {
    opacity: 1;
    top: 42px;
    visibility: visible;
}

#sort-options div {
    margin: 5px 0;
    padding: 7px 0;
    padding-left: 15px;
    font-size: 14px;
    color: rgb(78, 78, 78);
    cursor: pointer;
}

#sort-options div:hover {
    background-color: rgb(235, 235, 235);
}

.add-customer {
    font-size: 14px;
    color: rgb(255, 255, 255);
    background-color: rgb(21, 20, 41);
    border: 1px solid rgb(21, 20, 41);
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
}

.add-customer a {
    color: rgb(255, 255, 255);
}

.add-customer:hover {
    opacity: 0.8;
}

.more-filters {
    border: 1px solid rgb(218, 218, 218);
    /* display: flex;
    align-items: center;
    align-self: stretch; */
    align-self: stretch;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 6px;
    background-color: rgb(255, 255, 255);
}

.more-filters:hover {
    background-color: rgb(249, 249, 249);
}

.more-filters img {
    width: 20px;
    height: 20px;
}

.paging {
    display: flex;
    overflow: hidden;
}

.paging-container {
    display: flex;
    justify-content: center;
    border-radius: 6px;
    margin: 30px auto;
}

.paging-container a {
    padding: 10px 20px;
    color: rgb(76, 76, 76);
    border: none;
    border-top: 1px solid rgb(203, 203, 203);
    border-bottom: 1px solid rgb(203, 203, 203);

}

.paging-container a:hover {
    background-color: rgb(230, 230, 230);
}

.paging-container .previous-page {
    border-left: 1px solid rgb(203, 203, 203);
    border-radius: 6px 0 0 6px;
    cursor: pointer;
}

.paging-container .next-page {
    border-right: 1px solid rgb(203, 203, 203);
    border-radius: 0 6px 6px 0;
    cursor: pointer;
}

.paging-container a.inactive {
    opacity: 0.7;
    pointer-events: none;
}

.page-number {
    cursor: pointer;
}


.page-number.active {
    border-bottom: 2px solid rgb(60, 51, 105);
    border-top: 2px solid rgb(60, 51, 105);
}

.navigation-info {
    margin-top: 30px;
    font-size: 13px;
    color: rgb(59, 59, 59);
}

.mobile-close-btn {
    display: none;
    
}

.mobile-close-btn img {
    width: 12px;
    height: 12px;
    transform: rotate(180deg);
    display: block;
    margin-right: 10px;
    margin-left: auto;
    cursor: pointer;
}   

.mobile-menu-icon {
    width: 18px;
    height: 18px;
    display: none;
}

#logoutForm {
    margin:0;
    cursor: pointer;
}

.logoutBtn {
    border: none;
    appearance: none;
    
}

/* Toast Notifications */

#toast-container {
    position: fixed;
    right: 10;
    top: 0;
    width: 300px;
    z-index: 1015;
}

.toast-notification {
    display: flex;
    align-items: center;
    background-color: #283547;
    padding: 15px 12px;
    border-radius: 10px;
    margin-top: 10px;
    opacity: 1;
    visibility: hidden;
    animation: notification-enter 0.3s ease;
}

.toast-notification.shown {
    visibility: visible;
}

@keyframes notification-enter {
    0% {
        opacity: 0.3;
        transform: scale(0.8);
    }

    85% {
        opacity: 1;
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.notification-icon {
    padding: 7px;
    border-radius: 8px;
}

.notification-icon.success {
    background-color: #065f46;
}

.notification-icon.error {
    background-color: #991b1b;
}

.notification-icon.warning {
    background-color: #b78c41;
}

.notification-icon .icon-container {
    background-color: #ffffff;
    padding: 4px;
    border-radius: 50%;
}

.notification-icon img {
    width: 10px;
    height: 10px;
}

.notification-icon.success img {
    content: url('/static/images/check.png');
}

.notification-icon.error img {
    content: url('/static/images/close_not.png');
}

.notification-icon.warning img {
    content: url('/static/images/warning.png');
}

.notification-text {
    color: #abb2bf;
    font-size: 14px;
    flex-grow: 1;
    margin-left: 6px;
}

.close-notification {
    padding: 6px;
    border-radius: 8px;
    cursor: pointer;
}

.close-notification:hover {
    background-color: #3f4a5c;
}

.close-notification img {
    width: 13px;
    height: 13px;
}

.search-form {
    margin-bottom: 0;
    align-self: stretch;
}


button {
  -webkit-appearance: none; /* Remove Safari/WebKit default styles */
  -moz-appearance: none;    /* Remove Firefox default styles */
  appearance: none;         /* Standard */
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  margin: 0;
  font: inherit;            /* Inherit font settings */
  color: inherit;
  line-height: normal;
  box-shadow: none;
}

.search-submit {
    border: none;
}

#changeLangEn, #changeLangGr {
    cursor: pointer;
}

/* Sidebar overlay to block interactions while nav is open on mobile */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: transparent;
    display: none;
    z-index: 900;
}

.sidebar-overlay.shown {
    display: block;
}

/* Keep popups within the viewport on small screens */
@media (max-width: 900px) {
    #popup-container,
    .center-popup,
    #deletePopup,
    #unregisterPopup {
        left: 0;
        right: 0;
        width: 100%;
    }

    #popup-container #edit-container,
    .center-popup .container,
    #deletePopup .delete-container,
    #unregisterPopup .unregister-container {
        width: 92vw;
        max-width: 92vw;
        min-width: 0;
    }
}


@media screen and (width <= 800px) {
    /* removed empty .sidemenu ruleset inside media query */

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        transition: all 0.15s ease-in;
        background: rgb(37, 41, 50);
        z-index: 1000;
        margin-left: -240px;
        width: 240px;
        overflow-y: auto;
    }

    .sidebar.mobile-shown {
        margin-left: 0px;
    }

    .mobile-menu-icon {
        display: block;
    }

    .mobile-close-btn {
        display: none;
    }

    .main-content {
        margin-top: 0;
        border-radius: 0;
        padding: 0;
        margin-left: 0;
    }

    .profile-btn {
        width: 32px;
        height: 32px;
    }

    .title-section {
        flex-wrap: wrap;
        gap: 1rem 0;
    }

    .title-section .filters {
        width: 100%;
    }

    .profile-btn {
        display: none;
    }

    .search-form {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .search-customer,
    .search-class,
    .search-exercise {
        width: 100%;
        max-width: 520px;
        margin: 0 auto;
    }

    .link-title {
        font-size: 15px;
    }

    .link-container img {
        width: 20px;
        height: 20px;
    }

    .menu-title {
        font-size: 15px;
    }

    .top-bar {
        padding: 0 10px;
    }

    .top-bar .page-title {
        font-size: 15px;
    }
    
}
