/* ==========================================================================
   Budi Job Listing Table
   ========================================================================== */

.budi-jlt__wrapper {
    position: relative;
}

/* ==========================================================================
   Search Form
   ========================================================================== */

.budi-jlt__form-wrapper {
    margin-bottom: 70px;
}

.budi-jlt__form-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.budi-jlt__form-item {
    position: relative;
    flex: 1;
}

.budi-jlt__form-item:last-child {
    border-right: none;
}

.budi-jlt__form-item--submit {
    flex: 0 0 auto;
    border-right: none;
}

/* Text Input */
.budi-jlt__input {
    background: #fff;
    border: 1px solid #25252540;
    border-radius: 8px;
    padding: 16px 20px;
    min-height: 62px;
    font-size: 18px;
    color: #666666;
    width: 100%;
    outline: none;
}

.budi-jlt__input::placeholder {
    color: #9CA3AF;
    font-weight: 500;
}

.budi-jlt__input:focus {
    box-shadow: none;
    outline: none;
}


/* Submit Button */
.budi-jlt__form-wrapper button.budi-jlt__submit-btn {
    background: var(--color-heavy) !important;
    border: none;
    color: white;
    padding: 14px 28px;
    min-height: 62px;
    font-size: 18px !important;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    white-space: nowrap;
    transition: background 0.3s ease;
}

.budi-jlt__form-wrapper button.budi-jlt__submit-btn:hover {
    background: #143f3c !important;
}

/* ==========================================================================
   Custom Dropdown
   ========================================================================== */

.budi-jlt-dropdown {
    position: relative;
    width: 100%;
    background: #fff;
    border: 1px solid #25252540;
    border-radius: 8px;
}

.budi-jlt-dropdown button{
    background-color: transparent !important;
    border-radius: 0 !important;
    color: #666666 !important;
}

.budi-jlt-dropdown__trigger {
    appearance: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 20px;
    min-height: 62px;
    background: transparent;
    border: none;
    font-size: 18px;
    color: #666666;
    cursor: pointer;
    transition: color 0.3s ease;
    gap: 8px;
}

.budi-jlt-dropdown__trigger:hover {
    color: #1A5652;
}

.budi-jlt-dropdown__text {
    flex: 1;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.budi-jlt-dropdown__arrow {
    width: 14px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    color: #535353;
}

.budi-jlt-dropdown.is-active .budi-jlt-dropdown__arrow {
    transform: rotate(180deg);
}

.budi-jlt-dropdown__menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    box-shadow: 0px 4px 6px -1px rgba(0, 0, 0, 0.1), 0px 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.budi-jlt-dropdown.is-active .budi-jlt-dropdown__menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.budi-jlt-dropdown__item {
    appearance: none;
    display: block;
    width: 100%;
    padding: 12px 20px;
    border: 0;
    background: transparent;
    cursor: pointer;
    transition: background-color 0.2s ease;
    color: #374151;
    font-size: 15px;
    text-align: left;
}

.budi-jlt-dropdown__item:focus-visible{
    outline-offset: 0px !important;
}

.budi-jlt-dropdown__item:hover {
    background-color: #F3F4F6;
}

.budi-jlt-dropdown__item.is-selected {
    background-color: #1A5652;
    color: white;
}

.budi-jlt-dropdown__item:first-child {
    border-radius: 8px 8px 0 0;
}

.budi-jlt-dropdown__item:last-child {
    border-radius: 0 0 8px 8px;
}

/* Dropdown scrollbar */
.budi-jlt-dropdown__menu::-webkit-scrollbar {
    width: 6px;
}

.budi-jlt-dropdown__menu::-webkit-scrollbar-track {
    background: #F3F4F6;
    border-radius: 3px;
}

.budi-jlt-dropdown__menu::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 3px;
}

.budi-jlt-dropdown__menu::-webkit-scrollbar-thumb:hover {
    background: #9CA3AF;
}

.budi-jlt-dropdown__menu {
    scrollbar-width: thin;
    scrollbar-color: #D1D5DB #F3F4F6;
}

/* ==========================================================================
   Table
   ========================================================================== */

.budi-jlt__table-wrapper {
    background: #FFFFFFE0;
    border-radius: 16px;
    border: 1px solid #25252540;
    box-shadow: 0px 8px 35px 0px #6363631F;
}

.budi-jlt__table {
    width: 100%;
}

/* Row */
.budi-jlt__row {
    display: grid;
    grid-template-columns: 55% 1fr 1fr 48px;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 0;
    text-decoration: none;
    color: inherit;
}

.budi-jlt__row--header {
    padding-top: 40px;
    padding-bottom: 30px;
    padding-inline: 40px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.budi-jlt__body {
    padding-inline: 40px;
}

.budi-jlt__row--data {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: background-color 0.2s ease;
}

.budi-jlt__row--data:last-child {
    border-bottom: none;
}

.budi-jlt__row--data:hover {
    text-decoration: none;
    color: inherit;
}

/* Cells */
.budi-jlt__cell {
    font-size: 22px;
    color: #06353CE5;
}

.budi-jlt__row--header .budi-jlt__cell {
    font-weight: 600;
    font-size: 22px;
    color: var(--color-custom);
}

.budi-jlt__cell--title {
    font-weight: 500;
}

.budi-jlt__cell--arrow {
    display: flex;
    justify-content: flex-end;
}

/* Arrow Icon */
.budi-jlt__arrow-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-heavy);
    color: white;
    transition: background 0.3s ease;
    flex-shrink: 0;
}

.budi-jlt__row--data:hover .budi-jlt__arrow-icon {
    background: var(--color-heavy);
}

/* ==========================================================================
   Load More
   ========================================================================== */

.budi-jlt__load-more {
    display: flex;
    justify-content: center;
    margin-top: 32px;
}

.budi-jlt__load-more button.budi-jlt__load-more-btn {
    background: transparent !important;
    border: 1px solid var(--color-heavy) !important;
    color: var(--color-heavy) !important;
    padding: 8px 24px;
    min-height: 62px;
    border-radius: 100px !important;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.budi-jlt__load-more button.budi-jlt__load-more-btn:hover {
    background: var(--color-heavy) !important;
    color: white !important;
}

.budi-jlt__load-more button.budi-jlt__load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==========================================================================
   Not Found
   ========================================================================== */

.budi-jlt__not-found {
    text-align: center;
    padding: 30px 20px;
    color: #6B7280;
    font-size: 16px;
}

/* ==========================================================================
   Loading State
   ========================================================================== */

.budi-jlt__body.is-loading {
    position: relative;
    opacity: 0.5;
    pointer-events: none;
    min-height: 100px;
}

.budi-jlt__body.is-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 36px;
    height: 36px;
    margin: -18px 0 0 -18px;
    border: 3px solid #E5E7EB;
    border-top-color: #1A5652;
    border-radius: 50%;
    animation: budi-jlt-spin 0.8s linear infinite;
}

@keyframes budi-jlt-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media screen and (max-width: 991px) {
    .budi-jlt__form-container {
        flex-wrap: wrap;
        gap: 12px;
    }

    .budi-jlt__form-item {
        flex: 1 1 calc(50% - 6px);
        min-width: 0;
    }

    .budi-jlt__form-item--submit {
        flex: 1 1 100%;
    }

    .budi-jlt__form-wrapper button.budi-jlt__submit-btn {
        width: 100%;
        text-align: center;
    }

    .budi-jlt__row {
        grid-template-columns: 45% 1fr 1fr 48px;
    }

    .budi-jlt__table .budi-jlt__cell {
        font-size: 16px;
    }

    .budi-jlt__row--header .budi-jlt__cell {
        font-size: 16px;
    }

    .budi-jlt__input,
    .budi-jlt-dropdown__trigger,
    .budi-jlt__form-wrapper button.budi-jlt__submit-btn {
        font-size: 16px !important;
    }

    .budi-jlt__row--header{
        padding: 20px;
    }

    .budi-jlt__body{
        padding-inline: 20px;
    }
}

@media screen and (max-width: 767px) {
    .budi-jlt__form-wrapper {
        margin-bottom: 40px;
    }

    .budi-jlt__form-container {
        flex-direction: column;
        gap: 8px;
    }

    .budi-jlt__form-item {
        width: 100%;
        border-right: none;
    }

    .budi-jlt__form-item:not(.budi-jlt__form-item--submit) {
        box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.08);
        border-radius: 6px;
    }

    .budi-jlt__form-item--submit {
        width: 100%;
    }

    .budi-jlt__form-wrapper button.budi-jlt__submit-btn {
        width: 100%;
        text-align: center;
    }

    .budi-jlt__table-wrapper {
        border-radius: 12px;
    }

    .budi-jlt__row--header {
        padding-inline: 16px;
    }

    .budi-jlt__body {
        padding-inline: 16px;
    }

    .budi-jlt__row--header {
        display: none;
    }

    .budi-jlt__row--data {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        gap: 4px 12px;
        padding: 14px 0;
    }

    .budi-jlt__cell--title {
        grid-column: 1;
        grid-row: 1;
        font-weight: 600;
    }

    .budi-jlt__cell--category {
        grid-column: 1;
        grid-row: 2;
        color: #6B7280;
    }

    .budi-jlt__cell--location {
        grid-column: 1;
        grid-row: 3;
        color: #6B7280;
    }

    .budi-jlt__cell--arrow {
        grid-column: 2;
        grid-row: 1 / -1;
        align-self: center;
    }

    .budi-jlt__arrow-icon {
        width: 32px;
        height: 32px;
    }
}
