/* Show the section when the checkbox is checked */
.trp-language-field.trp-multiple-domains-inline-section {
    display: none;
}

.trp-multiple-domains-header{
    display: flex;
    align-items: center;
    justify-content: space-between;
}
/* Mobile / small screens */
@media (max-width: 568px) {
    .trp-multiple-domains-header {
        flex-direction: column;
        align-items: flex-start; /* keep left-aligned */
        gap: 16px;               /* vertical spacing */
    }
}

/* Target parent container and show section when checkbox inside is checked */
.trp-language:has(.trp-multiple-domains-enable-toggle:checked) .trp-language-field.trp-multiple-domains-inline-section {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    align-items: center;
    flex-grow: 1;
    flex-basis: 100%;
    padding: 0 10px 0 42px;
}

.trp-multiple-domains-input-group{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

button.trp-multiple-domains-use-current{
    border: none;
    background: none;
    padding: 0;
    margin: 0 calc(16px + 5px) 0 -25px; /* Align with Add Language Button */
    cursor: pointer;
}

button.trp-multiple-domains-use-current:hover {
    color: var(--trp-settings-accent-color);
}

.trp-multiple-domains-input-group input:not(:placeholder-shown) ~ button.trp-multiple-domains-use-current{
    visibility: hidden;
}

button.trp-multiple-domains-check-dns{
    display: flex;
    align-items: center;
    width: 129px;
    min-height: 39px;
}

button.trp-multiple-domains-check-dns span{
    margin-right: 6px;
}

button.trp-multiple-domains-check-dns.checking span{
    animation: trp-rotate 1s linear infinite;
}

@keyframes trp-rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(-360deg);
    }
}

.trp-language-field .trp-multiple-domains-input-group > input[type="text"]{
    width: 331px;
    padding-right: 30px;
}

/* Red border when domain input is empty and toggle is enabled */
/* #trp-settings__wrap input[type="text"], #trp-settings__wrap input[type="number"], #trp-settings__wrap input[type="select"], #trp-settings__wrap input[type="password"]*/
#trp-settings__wrap  input.trp-multiple-domains-input[type="text"]:placeholder-shown {
    border-color: var(--trp-settings-warning-text-color);
    background: var(--trp-settings-warning-bg-color);
}

.trp-multiple-domains-notification{
    margin-left: 16px;
}

.trp-multiple-domains-notification.trp-multiple-domains-success{
    color: var(--trp-settings-success-text-color);
}

.trp-multiple-domains-notification.trp-multiple-domains-error{
    color: var(--trp-settings-warning-text-color);
}

@media screen and (max-width: 1100px) {
    .trp-language:has(.trp-multiple-domains-enable-toggle:checked) .trp-language-field.trp-multiple-domains-inline-section {
        padding: 0;
        margin-top: 16px;
    }
    .trp-language-field .trp-multiple-domains-input-group > input[type="text"]{
        width: 100%;
        margin-bottom: 16px;
    }
    .trp-multiple-domains-use-current{
        display: none;
    }

    .trp-multiple-domains-notification{
        margin-left: 0px;
    }
}