/* GYM module Tailwind component supplement. */
.gym-nav-link {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    white-space: nowrap;
    border-radius: .5rem;
    padding: .5rem .75rem;
    color: rgb(75 85 99);
    font-size: .875rem;
    font-weight: 500;
    text-decoration: none;
}

.gym-nav-link:hover,
.gym-nav-link:focus {
    background: rgb(249 250 251);
    color: rgb(17 24 39);
    text-decoration: none;
    outline: none;
}

.gym-nav-link-active,
.gym-nav-link-active:hover,
.gym-nav-link-active:focus {
    background: rgb(238 242 255);
    color: rgb(67 56 202);
}

@media (min-width: 768px) {
    .gym-module-nav > div {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: thin;
    }

    .gym-module-nav > div > div:first-child {
        width: auto !important;
        flex: 0 0 auto;
    }

    .gym-module-nav #gym-navbar-collapse {
        display: block !important;
        width: auto !important;
        min-width: 0;
        flex: 1 1 auto;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .gym-module-nav #gym-navbar-collapse > ul {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center;
    }

    .gym-module-nav #gym-navbar-collapse > ul > li {
        flex: 0 0 auto;
    }
}

.gym-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
}

/* Neutralize the legacy Bootstrap grid inside GYM while views are rendered by
   the shared application layout. These selectors provide the Tailwind layout
   behavior without changing any JavaScript hooks. */
.gym-module .row {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1rem;
    margin: 0;
}

.gym-module .row::before,
.gym-module .row::after,
.gym-module .clearfix::before,
.gym-module .clearfix::after {
    display: none;
    content: none;
}

.gym-module [class*="col-"] {
    float: none;
    width: auto;
    min-width: 0;
    padding: 0;
    grid-column: 1 / -1;
}

/* Bootstrap rows often contain structural wrappers before their columns.
   Keep those wrappers full width so nested fields cannot collapse into one
   grid track. */
.gym-module .row > :not([class*="col-"]) {
    min-width: 0;
    grid-column: 1 / -1;
}

.gym-settings-grid,
.gym-subscription-fields,
.gym-module .payment_details_div {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1rem;
    width: 100%;
}

.gym-settings-grid > :not([class*="col-"]),
.gym-subscription-fields > :not([class*="col-"]),
.gym-module .payment_details_div > :not([class*="col-"]) {
    grid-column: 1 / -1;
}

.gym-module .payment_row,
.gym-module .payment_row > .row,
.gym-module .payment_details_div {
    min-width: 0;
}

.gym-module .payment_row > .row {
    width: 100%;
}

.gym-module .payment_row .input-group,
.gym-module .payment_row .form-group,
.gym-module .payment_row textarea,
.gym-module .payment_row input,
.gym-module .payment_row select,
.gym-module .payment_row .select2-container {
    min-width: 0;
    max-width: 100%;
}

.gym-module .form-group {
    margin-bottom: 1rem;
}

.gym-module .form-group > label {
    display: block;
    margin-bottom: .375rem;
    color: rgb(55 65 81);
    font-size: .875rem;
    font-weight: 600;
}

.gym-module .input-group {
    display: flex;
    width: 100%;
    min-width: 0;
    align-items: stretch;
}

.gym-module .input-group-addon {
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgb(209 213 219);
    background: rgb(249 250 251);
    width: 42px;
    min-height: 42px;
    padding: 0;
    color: rgb(107 114 128);
}

.gym-module .input-group-addon:first-child {
    border-radius: .5rem 0 0 .5rem;
    border-right: 0;
}

.gym-module .input-group .form-control {
    width: 1%;
    height: 42px;
    min-height: 42px;
    min-width: 0;
    flex: 1 1 auto;
    padding-top: .5rem;
    padding-bottom: .5rem;
    line-height: 1.25;
    border-radius: 0 .5rem .5rem 0;
}

.gym-module .input-group-btn {
    flex: 0 0 auto;
    display: flex;
    min-width: 42px;
}

.gym-module .input-group-btn > button {
    display: inline-flex;
    width: 42px;
    min-width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    margin-left: -1px;
    padding: 0;
    border-radius: 0 .5rem .5rem 0;
}

.gym-module .input-group > .select2-container {
    width: 1% !important;
    min-width: 0;
    flex: 1 1 auto;
}

.gym-module .input-group > .select2-container .select2-selection--single,
.gym-module .input-group > .select2-container .select2-selection--multiple {
    height: 42px;
    min-height: 42px;
    border-radius: 0 .5rem .5rem 0;
}

.gym-module .input-group > .select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 40px;
}

.gym-module .input-group > .select2-container .select2-selection--single .select2-selection__arrow {
    height: 40px;
}

.gym-module .input-group:has(.input-group-btn) > .form-control,
.gym-module .input-group:has(.input-group-btn) > .select2-container .select2-selection--single,
.gym-module .input-group:has(.input-group-btn) > .select2-container .select2-selection--multiple {
    border-radius: 0;
}

.gym-module .input-group:has(.input-group-btn) {
    overflow: hidden;
    border-radius: .5rem;
}

.gym-module .box,
.gym-module .panel,
.gym-module .nav-tabs-custom {
    overflow: hidden;
    margin: 0 0 1rem;
    border: 1px solid rgb(229 231 235);
    border-radius: 1rem;
    background: white;
    box-shadow: 0 1px 3px rgb(0 0 0 / .08);
}

.gym-module .box-header,
.gym-module .panel-heading {
    border-bottom: 1px solid rgb(229 231 235);
    background: white;
    padding: .9rem 1.25rem;
}

.gym-module .box-title,
.gym-module .panel-title {
    margin: 0;
    color: rgb(31 41 55);
    font-size: 1rem;
    font-weight: 700;
}

.gym-module .box-body,
.gym-module .panel-body,
.gym-module .tab-content {
    padding: 1.25rem;
}

.gym-module .table-responsive {
    width: 100%;
    overflow-x: auto;
}

.gym-module table.table {
    width: 100%;
    border-collapse: collapse;
    border: 0;
    text-align: left;
    font-size: .875rem;
}

.gym-module table.table th {
    white-space: nowrap;
    border: 0;
    border-bottom: 1px solid rgb(209 213 219);
    background: rgb(249 250 251);
    padding: .75rem;
    color: rgb(55 65 81);
    font-weight: 700;
}

.gym-module table.table td {
    border: 0;
    border-bottom: 1px solid rgb(243 244 246);
    padding: .75rem;
    vertical-align: middle;
    color: rgb(31 41 55);
}

.gym-module table.table tbody tr:nth-child(odd),
.gym-module table.table tbody tr:hover {
    background: rgb(249 250 251);
}

.gym-module .nav-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
    margin: 0;
    padding: 0;
    border: 0;
    border-bottom: 1px solid rgb(229 231 235);
    list-style: none;
}

.gym-module .nav-tabs > li {
    float: none;
    margin: 0;
}

.gym-module .nav-tabs > li > a {
    display: inline-flex;
    margin: 0;
    padding: .65rem .9rem;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    color: rgb(75 85 99);
    font-size: .875rem;
    font-weight: 600;
    text-decoration: none;
}

.gym-module .nav-tabs > li.active > a,
.gym-module .nav-tabs > li > a:hover {
    border: 0;
    border-bottom: 2px solid rgb(79 70 229);
    background: transparent;
    color: rgb(67 56 202);
}

.gym-module .pull-right {
    float: none !important;
    margin-left: auto;
}

.gym-module .pull-left {
    float: none !important;
    margin-right: auto;
}

.gym-module .text-right {
    text-align: right;
}

.gym-module .text-center {
    text-align: center;
}

.gym-module .text-muted {
    color: rgb(107 114 128);
}

.gym-module .hide {
    display: none !important;
}

.gym-module .label {
    display: inline-flex;
    border-radius: 9999px;
    padding: .2rem .55rem;
    font-size: .75rem;
    font-weight: 700;
}

.gym-grid-2,
.gym-grid-3,
.gym-grid-4,
.gym-grid-12 {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
}

.gym-card {
    overflow: hidden;
    border: 1px solid rgb(229 231 235);
    border-radius: 1rem;
    background: white;
    box-shadow: 0 1px 3px rgb(0 0 0 / .08);
}

.gym-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    border-bottom: 1px solid rgb(229 231 235);
    padding: .9rem 1.25rem;
}

.gym-card-body {
    padding: 1.25rem;
}

.gym-form-group {
    margin-bottom: 1rem;
}

.gym-form-group > label,
.gym-label {
    display: block;
    margin-bottom: .375rem;
    color: rgb(55 65 81);
    font-size: .875rem;
    font-weight: 600;
}

.gym-input,
.gym-module input[type="text"],
.gym-module input[type="email"],
.gym-module input[type="number"],
.gym-module input[type="password"],
.gym-module input[type="date"],
.gym-module input[type="time"],
.gym-module input[type="file"],
.gym-module select,
.gym-module textarea {
    width: 100%;
    border: 1px solid rgb(209 213 219);
    border-radius: .5rem;
    background: white;
    padding: .55rem .75rem;
    color: rgb(17 24 39);
    line-height: 1.35;
}

.gym-module input:focus,
.gym-module select:focus,
.gym-module textarea:focus,
.gym-input:focus {
    border-color: rgb(99 102 241);
    outline: none;
    box-shadow: 0 0 0 3px rgb(224 231 255);
}

.gym-module select {
    min-height: 42px;
    height: auto;
    padding-top: .5rem;
    padding-bottom: .5rem;
    line-height: 1.25;
}

.gym-module #select_location_id {
    height: 42px;
    padding: .5rem .75rem;
    color: rgb(17 24 39);
    line-height: 1.25;
}

.gym-module .input-group:has(#select_location_id) .input-group-addon {
    min-height: 42px;
}

.gym-input-group {
    display: flex;
    width: 100%;
    align-items: stretch;
}

.gym-input-addon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgb(209 213 219);
    background: rgb(249 250 251);
    padding: 0 .75rem;
    color: rgb(107 114 128);
}

.gym-input-group > .gym-input-addon:first-child {
    border-radius: .5rem 0 0 .5rem;
    border-right: 0;
}

.gym-input-group > input,
.gym-input-group > select,
.gym-input-group > .select2-container {
    min-width: 0;
    flex: 1 1 auto;
}

.gym-table-shell {
    width: 100%;
    overflow-x: auto;
}

.gym-table {
    width: 100% !important;
    border-collapse: collapse;
    text-align: left;
    font-size: .875rem;
}

.gym-table th {
    white-space: nowrap;
    border-bottom: 1px solid rgb(209 213 219);
    background: rgb(249 250 251);
    padding: .75rem;
    color: rgb(55 65 81);
    font-weight: 700;
}

.gym-table td {
    border-bottom: 1px solid rgb(243 244 246);
    padding: .75rem;
    vertical-align: middle;
    color: rgb(31 41 55);
}

.gym-table tbody tr:hover {
    background: rgb(249 250 251);
}

.gym-modal-dialog {
    position: relative;
    width: calc(100% - 2rem);
    max-width: 40rem;
    margin: 2rem auto;
}

.gym-tailwind-modal {
    inset: 0;
    z-index: 1050;
    overflow-y: auto;
    background: rgb(0 0 0 / .5);
    padding: 1px 0;
}

.gym-tailwind-modal .modal-backdrop {
    display: none;
}

.gym-modal-dialog-wide {
    max-width: 72rem;
}

.gym-modal-content {
    overflow: hidden;
    border: 1px solid rgb(229 231 235);
    border-radius: 1rem;
    background: white;
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);
}

.gym-modal-header,
.gym-modal-footer {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1rem 1.25rem;
}

.gym-modal-header {
    justify-content: space-between;
    border-bottom: 1px solid rgb(229 231 235);
}

.gym-modal-title-icon {
    margin-right: .65rem;
}

.gym-modal-footer {
    justify-content: flex-end;
    border-top: 1px solid rgb(229 231 235);
}

.gym-modal-body {
    padding: 1.25rem;
}

.gym-modal-close {
    display: inline-flex;
    width: 2rem;
    height: 2rem;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: .5rem;
    background: transparent;
    color: rgb(107 114 128);
    font-size: 1.5rem;
}

.gym-modal-close:hover {
    background: rgb(243 244 246);
    color: rgb(17 24 39);
}

.gym-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
    margin: 0 0 1rem;
    padding: 0;
    border-bottom: 1px solid rgb(229 231 235);
    list-style: none;
}

.gym-tabs a {
    display: inline-flex;
    padding: .65rem .9rem;
    border-bottom: 2px solid transparent;
    color: rgb(75 85 99);
    font-size: .875rem;
    font-weight: 600;
    text-decoration: none;
}

.gym-tabs .active a,
.gym-tabs a:hover {
    border-bottom-color: rgb(79 70 229);
    color: rgb(67 56 202);
}

.gym-module .select2-container {
    width: 100% !important;
}

.gym-module .select2-container .select2-selection--single,
.gym-module .select2-container .select2-selection--multiple {
    min-height: 40px;
    border-color: rgb(209 213 219);
    border-radius: .5rem;
}

.gym-module .dataTables_wrapper > .row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
    margin: 0 0 1rem !important;
}

.gym-module .dataTables_wrapper > .row::before,
.gym-module .dataTables_wrapper > .row::after {
    display: none;
}

.gym-module .dataTables_wrapper > .row > [class*="col-"] {
    float: none !important;
    width: auto !important;
    min-width: 0;
    padding: 0 !important;
}

.gym-module .dataTables_filter {
    margin-left: auto;
}

.gym-module .dataTables_filter input,
.gym-module .dataTables_length select {
    border: 1px solid rgb(209 213 219);
    border-radius: .5rem;
    background: white;
    padding: .4rem .6rem;
}

.gym-module .dt-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: .375rem;
}

.gym-module .dt-buttons .btn {
    float: none !important;
    margin: 0 !important;
    border: 1px solid rgb(209 213 219);
    border-radius: .5rem;
    background: white;
    padding: .4rem .65rem;
    color: rgb(55 65 81);
    font-size: .75rem;
    font-weight: 600;
}

@media (min-width: 640px) {
    .gym-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
    .gym-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .gym-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .gym-grid-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
    .gym-span-2 { grid-column: span 2 / span 2; }
    .gym-span-3 { grid-column: span 3 / span 3; }
    .gym-span-4 { grid-column: span 4 / span 4; }
    .gym-span-5 { grid-column: span 5 / span 5; }
    .gym-span-6 { grid-column: span 6 / span 6; }
    .gym-span-7 { grid-column: span 7 / span 7; }
    .gym-span-8 { grid-column: span 8 / span 8; }
    .gym-span-9 { grid-column: span 9 / span 9; }
    .gym-span-10 { grid-column: span 10 / span 10; }
    .gym-span-12 { grid-column: span 12 / span 12; }
    .gym-module .col-xs-6,
    .gym-module .col-sm-6,
    .gym-module .col-md-6 { grid-column: span 6 / span 6; }
    .gym-module .col-sm-4,
    .gym-module .col-md-4 { grid-column: span 4 / span 4; }
    .gym-module .col-sm-3,
    .gym-module .col-md-3 { grid-column: span 3 / span 3; }
    .gym-module .col-md-2,
    .gym-module .col-sm-2 { grid-column: span 2 / span 2; }
    .gym-module .col-md-8 { grid-column: span 8 / span 8; }
    .gym-module .col-md-9 { grid-column: span 9 / span 9; }
    .gym-module .col-md-10 { grid-column: span 10 / span 10; }
    .gym-module .col-xs-12,
    .gym-module .col-sm-12,
    .gym-module .col-md-12 { grid-column: span 12 / span 12; }
}

@media (min-width: 1024px) {
    .gym-module .col-lg-3 { grid-column: span 3 / span 3; }
}

@media (max-width: 767px) {
    .gym-module .dataTables_filter {
        width: 100%;
        margin-left: 0;
    }

    .gym-module .dataTables_filter label,
    .gym-module .dataTables_filter input {
        width: 100%;
    }
}
