.tr-container {
    max-width: 800px;
    margin: 20px auto 40px;
    padding: 15px 20px 20px 20px;
    border: 1px solid #e0e0e0;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-radius: 10px;
}

.tr-title {
    text-align: center;
    margin: 0 0 15px 0;
    font-size: 20px;
}

.tr-settings-title {
    text-align: center;
    margin-bottom: 20px;
    font-size: 18px;
    color: #333;
}

.tr-settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
    padding: 0 80px;
}

.tr-full-width-setting {
    grid-column: 1 / -1;
    /* Span across all columns */
}

#tr-custom-separator-box {
    padding-top: 30px;
    /* Adjust to align with the dropdown next to it */
}

#tr-settings-panel,
#tr-custom-separator-box {
    display: none;
}

#tr-custom-wrapper-box {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
}


.tr-grid-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.tr-input-box {
    margin-bottom: 15px;
}

.tr-input-box label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    font-size: 16px;
}

.tr-textarea {
    height: 200px;
    /* Fixed height for text areas */
    resize: vertical;
    /* Allow vertical resize only */
}

.tr-textarea,
.tr-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #bbb;
    border-radius: 6px;
    font-size: 15px;
    box-sizing: border-box;
    max-width: 100%;
}

/* Custom arrow for select dropdown */
select.tr-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 8L10 12L14 8' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 5px center;
    background-size: 20px 20px;
    padding-right: 20px;
    /* Make space for icon */
    cursor: pointer;
}

.tr-container input[type="text"].tr-input,
.tr-container input[type="number"].tr-input,
.tr-container select.tr-input,
.tr-container textarea.tr-textarea {
    background-color: #fff;
    border-radius: 6px;
    padding: 8px 13px;
    border: 1px solid #bbb;
}

.tr-container input[type="text"].tr-input:focus,
.tr-container input[type="number"].tr-input:focus,
.tr-container select.tr-input:focus,
.tr-container textarea.tr-textarea:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.5px rgba(0, 123, 255, .25);
    outline: none;
}

input.tr-input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

input.tr-input[type=number]::-webkit-inner-spin-button,
input.tr-input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.tr-buttons {
    margin: 15px 0 20px 0;
    text-align: center;
}

.tr-btn {
    background: #1371d6;
    border: none;
    color: #fff;
    padding: 8px 13px;
    margin: 2px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    vertical-align: middle;
    transition: transform 0.1s ease;
}

.tr-btn:disabled {
    background-color: #f0f0f0;
    color: #4c4c4c;
    cursor: not-allowed;
}

.tr-btn:not(:disabled):active {
    transform: scale(0.97);
}

.tr-btn:not(:disabled):hover {
    background-color: #0069d9;
}

.tr-btn:not(:disabled):focus {
    background-color: #1371d6;
    color: #fff;
    box-shadow: none;
    outline: none;
}

/* Prevent theme styles on DISABLED buttons */
.tr-btn:disabled:hover,
.tr-btn:disabled:focus,
.tr-btn:disabled:active {
    background-color: #f0f0f0;
    /* Keep disabled background */
    color: #4c4c4c;
    /* Keep disabled text color */
    box-shadow: none;
}

.tr-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 39px;
}

.tr-svg-icon {
    width: 16px;
    height: 16px;
}

.tr-output-box {
    margin-top: 0;
}

.tr-output-box label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
}

.faq-list {
    margin-top: 1rem;
}

.faq-list dt {
    font-weight: 500;
    font-size: 1.1em;
}

.faq-list dd {
    margin-left: 0;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    padding-left: 1rem;
    padding-bottom: 10px;
    border-bottom: 1px dashed #ddd;
}

@media (max-width: 600px) {
    .tr-container {
        box-shadow: none;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-top: 1px solid #e0e0e0;
        border-bottom: 1px solid #e0e0e0;
        padding-left: 0;
        padding-right: 0;
        padding-bottom: 40px;
    }

    .tr-buttons {
        position: -webkit-sticky;
        position: sticky;
        top: 0;
        background: #fff;
        z-index: 10;
        padding: 10px 0;
        margin: 5px;
        margin-top: -16px;
    }

    .tr-settings-grid {
        grid-template-columns: 1fr;
    }

    #tr-custom-separator-box {
        padding-top: 0;
        padding-bottom: 15px;
    }

    .tr-settings-grid {
        padding: 5px 0 20px 0;
    }

    .tr-textarea {
        min-height: 150px;
    }

    .tr-left-column,
    .tr-right-column {
        min-width: 0;
    }

    .tr-grid-layout {
        gap: 10px;
    }

}

@media (min-width: 768px) {
    .tr-grid-layout {
        grid-template-columns: 1fr 1fr;
        align-items: stretch;
    }
}