.ms-open {
    cursor: pointer;
}

.ms-dialog {
    display: none;
}

.ms-form {
    color: #222;
}

.ms-field,
.ms-section {
    display: block;
    margin-top: 14px;
}

.ms-limits {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.ms-limit-item {
    padding: 8px 10px;
    border: 1px solid #ddd;
    background: #f7f7f7;
}

.ms-limit-item strong {
    display: block;
    font-size: 18px;
    line-height: 1.2;
}

.ms-limit-item span {
    display: block;
    margin-top: 3px;
    color: #666;
    font-size: 12px;
    line-height: 1.35;
}

.ms-progress {
    height: 6px;
    margin-top: 8px;
    overflow: hidden;
    background: #e5e5e5;
}

.ms-progress i {
    display: block;
    height: 100%;
    background: #2b7a2e;
}

.ms-faq {
    margin-top: 10px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    background: #f7f7f7;
}

.ms-faq summary {
    cursor: pointer;
    font-weight: 700;
}

.ms-faq-body {
    margin-top: 8px;
    color: #555;
    font-size: 12px;
    line-height: 1.45;
}

.ms-faq-body p {
    margin: 5px 0 0;
}

.ms-unmarked-genres {
    margin-top: 10px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    background: #f7f7f7;
}

.ms-unmarked-genres strong {
    display: block;
    margin-bottom: 6px;
}

.ms-unmarked-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ms-unmarked-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 7px;
    border: 1px solid #d0d0d0;
    background: #fff;
    color: #555;
    font-size: 12px;
}

.ms-unmarked-item i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #9a9a9a;
    color: #fff;
    font-style: normal;
    font-size: 10px;
    line-height: 14px;
}

.ms-field span {
    display: block;
    margin-bottom: 6px;
}

.ms-field textarea {
    box-sizing: border-box;
    width: 100%;
}

.ms-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.ms-existing-block {
    margin-bottom: 10px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    background: #f7f7f7;
}

.ms-existing-block strong {
    display: block;
    margin-bottom: 6px;
}

.ms-existing-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ms-existing-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 7px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    background: #fff;
    font-size: 12px;
}

.ms-existing-item em {
    color: #777;
    font-style: normal;
}

.ms-existing-empty {
    color: #777;
    font-size: 12px;
}

.ms-item {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 150px auto auto;
    gap: 8px;
    align-items: start;
    margin-bottom: 8px;
}

.ms-item .ts-wrapper {
    min-width: 0;
}

.ms-form .ts-wrapper.single .ts-control {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
}

.ms-form .ts-wrapper.single .ts-control > .item {
    flex: 0 1 auto;
    max-width: calc(100% - 34px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ms-form .ts-wrapper.single .ts-control > input {
    flex: 1 1 24px !important;
    width: auto !important;
    min-width: 24px;
}

.ms-timecode {
    box-sizing: border-box;
    width: 100%;
}

.ms-timecode-invalid {
    border-color: #b00020;
}

.ms-timecode-error {
    grid-column: 2;
    margin-top: -4px;
    color: #b00020;
    font-size: 12px;
    line-height: 1.3;
}

.ms-whole-label {
    white-space: nowrap;
    line-height: 34px;
}

.ms-remove {
    white-space: nowrap;
}

.ms-error {
    margin-top: 12px;
    color: #fff;
    background: #b00020;
    padding: 10px;
    border-radius: 5px;
}

.ms-actions {
    margin-top: 16px;
}

.ms-character-list small,
.ts-dropdown small {
    display: block;
    color: #777;
    font-size: 11px;
    line-height: 1.3;
}

.ui-dialog .ms-dialog {
    overflow: visible;
}

.ui-dialog .ts-dropdown {
    z-index: 100000;
}

@media (max-width: 680px) {
    .ms-limits {
        grid-template-columns: 1fr;
    }

    .ms-item {
        grid-template-columns: 1fr;
    }

    .ms-timecode-error {
        grid-column: 1;
    }

    .ms-whole-label {
        line-height: 1.4;
    }
}
