.exam-english {
    padding: 15px 15px 0 15px;
    background: #FFF;
    box-shadow: rgba(0, 0, 0, 0.02) 0px 1px 3px 0px, rgba(27, 31, 35, 0.15) 0px 0px 0px 1px;
}

#btn-copy-answer {
    font-size: 14px;
    background-color: red;
    color: white;
    font-weight: 600;
    border-radius: 4px;
}

/* .exam-english h1 {
    font-size: 28px;
}

.exam-english h2 {
    font-size: 24px;
}

.exam-english h3 {
    font-size: 20px;
}

.exam-english h4 {
    font-size: 18px;
} */

/* .exam-english h5 {
    font-size: 16px;
} */


.mic-button.recording {
    background: #dc3545;
    animation: pulse 1.2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, .6);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

.custom-modal {
    display: none;
    /* hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.custom-modal-dialog {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100%;
    padding: 20px;
}

.custom-modal-content {
    background-color: #fff;
    border-radius: 8px;
    max-width: 800px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.custom-modal-header,
.custom-modal-footer {
    padding: 15px;
    background-color: #f1f1f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.custom-modal-body {
    padding: 15px;
    overflow-y: auto;
}

.custom-modal-title {
    margin: 0;
    font-size: 18px;
}

.custom-close-btn,
.custom-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

.custom-close-btn:hover,
.custom-btn:hover {
    color: red;
}

.custom-table-wrapper {
    overflow-x: auto;
    margin-top: 15px;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
}

.custom-table th,
.custom-table td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: left;
}

.blank-input {
    border: 1px solid black;
    padding: 5px;
    margin-bottom: 10px;
    margin-bottom: 10px;
}

.question-number {
    margin-bottom: 10px;
}

.bg-success {
    background-color: green;
    color: white;
}

.bg-danger {
    background-color: #ec6a29;
    color: white;
}

.correct-answer {
    color: green;
    margin-left: 6px;
}

.text-center {
    text-align: center;
}

.ielts-writing-part-announcement-container {
    grid-row: 1;
    grid-column: 1 / -1;
    padding: 2px 15px;
    border-radius: 5px;
    border: 1px solid lightgray;
    line-height: 1.5;
    margin-bottom: 10px;
}

.ielts-writing-part-announcement.current {
    display: flex;
    flex-wrap: wrap;
}

.ielts-writing-part-question-count {
    width: 100%;
}

.answers {
    padding: 10px;
    font-family: var(--font-body-family);
    font-size: 18px;
}

/* Khối kết quả */
.result-writing {
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 8px;
    background: #fafafa;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

/* Loading spinner */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.exam-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 5px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 5px;
}

.exam-logo {
    display: flex;
}

.exam-logo img {
    width: 50px;
}

.no-bg mark {
    background: none;
}

.exam-timer {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 16px;
}

.menu-btn,
.fullscreen-btn {
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    padding: 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fullscreen-btn:hover svg path {
    stroke: #007bff;
}

.fullscreen-btn {
    padding: 8px 25px;
    border-radius: 6px;
    border: 1px solid #7f8b6f;
    background: #67754cc2;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.menu-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 40px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    z-index: 1000;
}

.menu-dropdown.show {
    display: block;
}

.menu-item {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item:hover {
    background: #f5f5f5;
}

body.focus-mode {
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* Split fullscreen rules to prevent browser drop if one vendor prefix/pseudo is unsupported */
body.focus-mode .exam-english {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    width: 100dvw;
    height: 100vh;
    height: 100dvh;
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    padding: 15px;
    background: #FFF;
    z-index: 9999;
    box-sizing: border-box;
    overflow: hidden;
}

.exam-english:fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    width: 100dvw;
    height: 100vh;
    height: 100dvh;
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    padding: 15px;
    background: #FFF;
    z-index: 9999;
    box-sizing: border-box;
    overflow: hidden;
}

.exam-english:-webkit-full-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    width: 100dvw;
    height: 100vh;
    height: 100dvh;
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    padding: 15px;
    background: #FFF;
    z-index: 9999;
    box-sizing: border-box;
    overflow: hidden;
}

.questions-panel p,
.questions-content p {
    line-height: 2;
}

body.focus-mode .exam-english .my-article,
.exam-english:fullscreen .my-article,
.exam-english:-webkit-full-screen .my-article {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Ensure child layout segments grow/shrink appropriately inside flexbox */
body.focus-mode .exam-header,
body.focus-mode .part-header,
body.focus-mode .audio-player,
.exam-english:fullscreen .exam-header,
.exam-english:fullscreen .part-header,
.exam-english:fullscreen .audio-player,
.exam-english:-webkit-full-screen .exam-header,
.exam-english:-webkit-full-screen .part-header,
.exam-english:-webkit-full-screen .audio-player {
    flex-shrink: 0;
}

body.focus-mode .navigation,
.exam-english:fullscreen .navigation,
.exam-english:-webkit-full-screen .navigation {
    flex-shrink: 0;
    padding-top: 10px;
    padding-bottom: 10px;
}

body.focus-mode .audio-player {
    margin-bottom: 10px;
}

/* Main toolbar & content wrappers */
body.focus-mode .exam-english .toolbar-enabled,
.exam-english:fullscreen .toolbar-enabled,
.exam-english:-webkit-full-screen .toolbar-enabled {
    flex: 1 1 0%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

body.focus-mode .exam-english .toolbar-enabled form,
.exam-english:fullscreen .toolbar-enabled form,
.exam-english:-webkit-full-screen .toolbar-enabled form {
    flex: 1 1 0%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    /* overflow: hidden; */
    height: 100%;
}

body.focus-mode .exam-english .question-wrapper,
.exam-english:fullscreen .question-wrapper,
.exam-english:-webkit-full-screen .question-wrapper {
    flex: 1 1 0%;
    min-height: 0;
    height: 100%;
    max-height: none !important;
}

/* Panel internals scroll separately */
body.focus-mode .exam-english .reading-panel,
body.focus-mode .exam-english .questions-panel,
body.focus-mode .exam-english .question-wrapper-info,
body.focus-mode .exam-english .questions-content,
.exam-english:fullscreen .reading-panel,
.exam-english:fullscreen .questions-panel,
.exam-english:fullscreen .question-wrapper-info,
.exam-english:fullscreen .questions-content,
.exam-english:-webkit-full-screen .reading-panel,
.exam-english:-webkit-full-screen .questions-panel,
.exam-english:-webkit-full-screen .question-wrapper-info,
.exam-english:-webkit-full-screen .questions-content {
    height: 100% !important;
    max-height: 100% !important;
    overflow-y: auto !important;
}

.audio-player {
    background: #f9f9f9;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.audio-title {
    font-weight: bold;
    margin-bottom: 10px;
}

.highlight-tag {
    background: #fff3cd !important;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.highlight-tag span {
    background: #fff3cd !important;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.highlight-tag sup {
    color: #dc3545;
    font-size: 0.75em;
    margin-left: 3px;
}


.audio-controls {
    display: flex;
}

.audio-controls audio {
    width: 100%;
}

.questions-content {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    /* margin-bottom: 15px; */
    /* min-height: 400px; */
    /* max-height: 600px; */
    max-height: calc(100vh - 250px);
    overflow-y: scroll;
    font-size: 18px;
}

/* body.focus-mode .question-wrapper {
        max-height: calc(100vh - 250px);
} */

.answer-text {
    font-weight: 600;
    margin: 0 10px;
}

.question-section {
    margin-bottom: 40px;
}

.question-title {
    /* font-weight: bold; */
    margin-bottom: 10px;
    font-size: 18px;
}

.question-subtitle {
    margin-bottom: 15px;
    font-size: 18px;
}

.section-name {
    font-weight: bold;
    margin: 20px 0 10px 0;
    font-size: 16px;
}

.question-item {
    margin-bottom: 15px;
    /* display: flex;
    align-items: center; */
    gap: 10px;
}

.question-item input[type="text"] {
    width: 120px;
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.question-number {
    display: inline-block;
    min-width: 30px;
    width: auto;
    height: 30px;
    padding: 0 5px;
    border: 1px solid black;
    text-align: center;
    line-height: 28px;
    font-weight: bold;
    margin-right: 10px;
    border-radius: 4px;
}

.option-item {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-left: 20px;
}

.option-item input {
    margin-top: 6px;
    cursor: pointer;
}

.option-item label {
    cursor: pointer;
    flex: 1;
    min-width: 0;
}

.answer-alpha {
    display: inline-block;
    width: 28px;
    height: 28px;
    text-align: center;
    line-height: 28px;
    font-weight: bold;
    background-color: rgb(225, 224, 224);
    border-radius: 50%;
}

.part-content .select-item {
    display: block;
}

.select-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.select-item select {
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    min-width: 100px;
}

.event-list {
    margin-bottom: 20px;
}

.event-list div {
    margin-bottom: 8px;
}

.navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #e0e0e0;
    padding-top: 15px;
    padding-bottom: 15px;
    position: relative;
    gap: 10px;
    background-color: #FFF;
    z-index: 1;
}

@media (max-width: 992px) {
    .navigation {
        flex-wrap: wrap;
    }
}

.prev-next {
    /* position: absolute; */
    bottom: calc(100% + 15px);
    left: 0;
}

.nav-btn {
    padding: 10px 20px;
    background: #67754c;
    color: #FFF;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.nav-btn:disabled {
    background: darkgray;
    cursor: not-allowed;
}

.parts-container {
    display: flex;
    gap: 10px;
}

.part-tab {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

.part-tab.active {
    border-color: #afba9d;
    background: #e6f2d3;
}

.part-tab.active .part-info {
    display: none;
}

.part-title {
    font-weight: bold;
    white-space: nowrap;
}

.part-tab.active .part-title {
    color: #000;
}

.part-info {
    font-size: 12px;
    font-style: italic;
    color: #666;
}

.question-numbers {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.question-btn {
    min-width: 32px;
    width: auto;
    height: 32px;
    border: 1px solid #999;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    padding: 0 5px;
}

.question-btn:hover {
    background: #f0f0f0;
}

.submit-btn,
#viewResultsBtn {
    /* position: absolute; */
    bottom: calc(100% + 15px);
    right: 0px;
    padding: 10px;
    background: #67754c;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
    gap: 5px;
    white-space: nowrap;
}

.submit-btn:hover {
    background: #037373;
}

.hidden {
    display: none !important;
}

label {
    font-weight: 400;
    display: block;
    font-size: 18px;
    margin-bottom: 0;
}

/* Reading  */
.part-header {
    padding: 4px 0px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 15\px;
}

.part-title {
    font-weight: bold;
}

.zoom-controls {
    margin-left: auto;
    display: flex;
    gap: 5px;
}

.zoom-btn {
    width: 30px;
    height: 30px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.zoom-btn:hover {
    background: #e0e0e0;
}

.main-content,
.question-wrapper {
    display: grid;
    grid-template-columns: 0.5fr 10px 1fr;
    max-height: calc(100vh - 250px);
    width: 100%;
}

.reading.question-wrapper {
    grid-template-columns: 1fr 10px 1fr;
}

@media (max-width: 992px) {

    .main-content,
    .question-wrapper {
        max-height: fit-content;
    }
}

.reading-panel {
    overflow-y: auto;
    padding: 20px 20px 20px 0;
    background: #fafafa;
    max-height: calc(100vh - 250px);
    min-height: 400px;
    font-size: 18px;
}

.resizer {
    width: 10px;
    background: #e0e0e0;
    cursor: col-resize;
    position: relative;
    transition: background 0.2s;
    touch-action: none;
    z-index: 999;
}

body.resizing {
    cursor: col-resize;
    user-select: none;
}

.resizer:hover {
    background: #bdbdbd;
}

.resizer::before {
    content: '⋮';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #666;
    font-size: 20px;
}

.questions-panel {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    background: white;
    max-height: calc(100vh - 250px);
    min-height: 400px;
}

body.focus-mode .questions-panel,
body.focus-mode .reading-panel {
    max-height: 100%;
}

#examTimer.warning {
    color: red;
    font-weight: bold;
    animation: blink 1s infinite;
}

@keyframes blink {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.passage-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
}

.passage-text {
    line-height: 1.8;
    font-size: 17px;
    color: #333;
}

.passage-text p {
    margin-bottom: 15px;
    padding: 0;
}

/* listening  */
.exam-listening .exam-header {
    margin: 15px 15px 10px;
}

.exam-listening .header {
    background-color: white;
    padding: 20px;
}

.exam-listening .header h1 {
    font-size: 24px;
    font-weight: 600;
}

.exam-listening .navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.exam-listening .navigation button {
    background-color: #67754c;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.exam-listening .navigation button:hover {
    background-color: #2a2a2a;
}

.exam-listening .navigation button:disabled {
    background-color: #d0d0d0;
    color: #888;
    cursor: not-allowed;
}

.exam-listening .navigation button:disabled:hover {
    background-color: #d0d0d0;
}

.exam-listening .question-container {
    background-color: white;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.exam-listening .question-container .question-label {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #666;
    margin-bottom: 20px;
}

.exam-listening .question-container .question-text {
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 30px;
    line-height: 1.4;
}

.exam-listening .audio-section {
    background-color: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 40px 40px;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.exam-listening .audio-section .mic-button {
    width: 80px;
    height: 80px;
    background: #037373;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(52, 199, 89, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.exam-listening .audio-section .mic-button svg {
    width: 40px;
    height: 40px;
    fill: #FFF;
}

.exam-listening .audio-section .mic-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(52, 199, 89, 0.4);
}

.exam-listening .audio-section .mic-button:active {
    transform: scale(0.95);
}

.exam-listening .audio-section .upload-button {
    background-color: #67754c;
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.exam-listening .audio-section .upload-button:hover {
    background-color: #0051d5;
}

.exam-listening .speaking-time {
    font-size: 14px;
    color: #666;
    margin: 15px;
}

.exam-listening .action-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.exam-listening .action-buttons .btn-reply {
    background-color: #afba9d;
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.exam-listening .action-buttons .btn-reply:hover {
    background-color: #0051d5;
}

.exam-listening .action-buttons .btn-submit {
    background-color: #67754c;
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.exam-listening .action-buttons .btn-submit:hover {
    background-color: #30b350;
}

.exam-listening .action-buttons .btn-submit .arrow-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.anwser-last {
    font-weight: 700;
    display: inline-block;
    margin: 0 10px;
}

.explain-answer-button {
    display: inline-block;
    margin-right: 10px;
    font-size: 14px;
    padding: 0px 10px;
    line-height: 2;
    border: 1px solid gray;
    cursor: pointer;
    border-radius: 5px;
    font-weight: 700;
}

.info-wrapper {
    display: inline-block;
}

.note-info {
    position: fixed;
    /* QUAN TRỌNG */
    max-width: 800px;
    background: #fff;
    border: 1px solid #ddd;
    padding: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .15);
    border-radius: 6px;
    z-index: 10;
    display: none;
}

.note-info.is-open {
    display: block;
}

.question-wrapper {
    display: grid;
    grid-template-columns: 0.5fr 10px 1fr;
    align-items: stretch;

    @media (max-width: 992px) {
        grid-template-columns: 1fr !important;

        .question-wrapper-scoll {
            display: none;
        }
    }

    &:not(.is-result) {
        grid-template-columns: 1fr;

        .question-wrapper-info {
            display: none;
        }

        .question-wrapper-scoll {
            display: none !important;
        }
    }
}

.question-wrapper.has-result {
    grid-template-columns: 1fr 10px 1fr;
}

.question-wrapper-info,
.questions-content {
    min-width: 0;
    /* allow flex/grid children to shrink */

}

.question-wrapper-info {
    min-height: 400px;
    /* max-height: 600px; */
    max-height: calc(100vh - 250px);
    overflow-y: auto;

    img {
        max-width: 100%;
    }
}

.question-wrapper-info .ielts-reading-transcript {
    padding: 20px;
    padding-left: 0px;
    font-size: 18px;
}


.question-wrapper-scoll {
    position: relative;
    cursor: ew-resize;
    user-select: none;
    background: lightgray;
    touch-action: none;
    z-index: 1;
}

.question-wrapper-scoll svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 35px;
    height: 35px;
    cursor: ew-resize;
}

.question-wrapper-scoll svg:hover {
    opacity: 0.8;
}

@media (max-width: 1280px) {
    .part-tab {
        font-size: 14px;
    }

    .question-btn {
        min-width: 25px;
        height: 25px;
    }
}

@media (max-width: 992px) {
    .reading-panel {
        max-height: calc((100vh - 280px) / 2);
        min-height: 200px;
        border-bottom: 1px solid #000;

    }

    .questions-panel {
        max-height: calc((100vh - 280px) / 2);
        min-height: 200px;
        padding-left: 0;
    }

    .part-tab {
        display: none;
    }

    .part-tab.active {
        display: block;
    }

    .nav-btn span {
        display: none;
    }

    .main-writing {
        display: block;
    }
}

.lock-container {
    position: relative;
}

.btn-lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(2px);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: not-allowed;
}

@media (max-width: 992px) {
    .fullscreen-btn {
        display: none;
    }
}

/* Custom Select Styles */
.custom-select-wrapper {
    position: relative;
    display: inline-block;
    min-width: 100px;
    user-select: none;
    vertical-align: middle;
}

.custom-select-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    min-height: 32px;
    font-size: 16px;
    box-sizing: border-box;
}

.custom-select-trigger:hover {
    border-color: #999;
}

.custom-select-wrapper.open {
    z-index: 10;
}

.custom-select-wrapper.open .custom-select-trigger {
    border-color: #67754c;
    box-shadow: 0 0 0 2px rgba(103, 117, 76, 0.2);
}

.custom-select-trigger .arrow {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #666;
    transition: transform 0.2s ease;
    margin-left: 10px;
}

.custom-select-wrapper.open .custom-select-trigger .arrow {
    transform: rotate(180deg);
}

.custom-options {
    position: absolute;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    /* max-height: 200px; */
    overflow-y: auto;
}

.custom-select-wrapper.open .custom-options {
    display: block;
}

/* Positioning classes */
.custom-select-wrapper.open-below .custom-options {
    top: 100%;
    margin-top: 4px;
}

.custom-select-wrapper.open-above .custom-options {
    bottom: 100%;
    margin-bottom: 4px;
}

.custom-option {
    padding: 4px 12px;
    cursor: pointer;
    font-size: 16px;
    color: #333;
    transition: background 0.15s ease;
}

.custom-option:hover {
    background-color: #f5f5f5;
}

.custom-option.selected {
    background-color: #e6f2d3;
    color: #67754c;
    font-weight: bold;
}

/* Disabled state */
.custom-select-wrapper.disabled {
    pointer-events: none;
}

.custom-select-wrapper.disabled .custom-select-trigger {
    background-color: #f5f5f5;
    color: #666;
    border-color: #ddd;
    cursor: not-allowed;
}

.custom-select-wrapper.disabled .custom-select-trigger .arrow {
    border-top-color: #999;
}

@media (max-width: 768px) {
    #partBadge {
        display: none;
    }
}