.caption-settings-dialog {
    font-family: Arial, Helvetica, sans-serif;
    gap: 15px;
    display: flex;
    flex-direction: column;
}

.dialog-subTitle {
    display: flex;
    font-weight: 400;
    font-size: 15px;
    line-height: 150%;
    align-items: center;
    color: #494949;
}

.caption-preview-section {
    border: 1px solid #E3E3E3;
    padding: 15px;
    border-radius: 10px;
}

.caption-preview-legend {
    border: 0;
    width: auto;
    margin: 0;
    font-size: 14px;
    line-height: 100%;
    font-weight: 400;
    color: #6B6B6B;
    padding: 10px 10px 0px 10px;
}

.caption-preview-box {
    background-color: #4965FF;
    color: white;
    padding: 8px 20px;
    border-radius: 4px;
    text-align: center;
    font-size: 16px;
    line-height: 1.4;
    min-height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    margin: auto;
}

.caption-setting-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.caption-setting-row.horizontal {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
}

.caption-setting-label {
    align-items: center;
    font-weight: 500;
    font-size: 15px;
    line-height: 150%;
    color: #333333;
    white-space: nowrap;
}

.font-family-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: space-between;
}

.font-family-button {
    padding: 8px 10px;
    border: 1px solid #DFDFDF;
    border-radius: 4px !important;
    background-color: white;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    transition: all 0.2s;
    position: relative;
    min-width: 95px;
}

.font-family-button:hover {
    border-color: #999;
    background-color: #f5f5f5;
}

.font-family-button.selected {
    border-color: #42296E;
    background-color: #EEF1FF;
    color: #333333;
}

.font-family-button .checkmark {
    position: absolute;
    top: -7px;
    right: -5px;
    background-color: #64298F;
    color: white;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.font-family-control {
    width: 200px;
    margin-left: auto;
}

.color-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
}

.color-swatches {
    display: flex;
    gap: 8px;
    position: relative;
    align-items: center;
}

.color-swatch {
    width: 32px;
    height: 32px;
    padding: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid #DFDFDF;
    border-radius: 7px !important;
    position: relative;
    cursor: pointer;
}

.swatch-inner {
  width: 24px;
  height: 24px;
  background: #ffffff;
  border: 1px solid #ededed;
  border-radius: 4px;
  flex-shrink: 0;
}

.color-swatch:not(.selected):hover {
    background-color: white;
    border-color: #919191;
}

.color-swatch.selected {
    border-color: #42296E;
}

.color-swatch .checkmark {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 14px;
    height: 14px;
    background: #64298F;
    border: 1px solid #fdfdfd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 9px;
    font-weight: bold;
    line-height: 1;
}

.color-swatch .swatch-inner[style*="ffffff"] .checkmark,
.color-swatch .swatch-inner[style*="FFFFFF"] .checkmark {
    color: #4965FF;
    text-shadow: none;
}

.native-color-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.rgb-inputs {
    display: flex;
    flex-direction: row;
    gap: 1px;
    height: 28px;
    border-radius: 4px;
    overflow: hidden;
}

.rgb-input {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px;
  width: 50px;
  background: #f3f3f3;
}

.rgb-input:first-child {
  border-radius: 4px 0 0 4px !important;
}

.rgb-input:last-child {
  border-radius: 0 4px 4px 0 !important;
}

.rgb-prefix {
  font-family: Inter, sans-serif;
  font-size: 13px;
  color: #6c6c6c;
  user-select: none;
}

.rgb-input input {
  width: 24px;
  border: none;
  background: transparent;
  font-size: 13px;
  color: #333;
  text-align: center;
  outline: none;
  padding: 0;
}

.rgb-input input::-webkit-inner-spin-button,
.rgb-input input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.rgb-input input[type=number] {
  -moz-appearance: textfield;
}

.slider-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.slider-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.slider-middle-line {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 6px;
    background-color: #7F7F7F;
    pointer-events: none;
    z-index: 0;
}

.slider-button {
    width: 24px;
    height: 24px;
    border: 1px solid #DFDFDF;
    border-radius: 4px !important;
    background-color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
    color: #364153;
}

.slider-button span {
    font-size: 18px;
    transform: translateY(-1px);
}

.slider-button:hover {
    border-color: #999;
    background-color: #f5f5f5;
    color: #333;
}

.slider-button:active {
    background-color: #e5e5e5;
}

.slider {
    -webkit-appearance: none;
    width: 116px;
    height: 6px;
    min-height: 6px !important;
    background: #DFDFDF;
    border-radius: 2px;
    position: relative;
    margin: 0;
    outline: none;
    appearance: none;
    opacity: 1;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: #0B6F85;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 1;
    transition: all 0.2s;
}

.slider::-webkit-slider-thumb:hover {
    background: #34909C;
}

.slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #0B6F85;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.slider::-moz-range-thumb:hover {
    background: #34909C;
}

.caption-settings-dialog .slider:before,
.caption-settings-dialog .slider:after {
    content: none;
    display: none;
}

.slider-value {
    min-width: 50px;
    font-weight: 400;
    font-size: 14px;
    line-height: 150%;
    text-align: right;
    color: #333333;
}

/* Responsive adjustments */
@media screen and (max-width: 600px) {
    .caption-settings-dialog {
        padding: 16px;
    }
    
    .color-controls {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .font-family-buttons {
        flex-direction: column;
    }
    
    .font-family-button {
        width: 100%;
    }
}

.section-divider {
    height: 19px;
    background-color: #DBDBDB;
    width: 1px;
}

.caption-settings-dialog :is(button:not(.dropdown-toggle-component), input[type="number"], input[type="range"]):focus-visible {
    outline: 2px solid #0B6F85 !important;
    outline-offset: 2px !important;
    border-radius: 4px !important;
}