.moseo_main {
  width: 100%;
  margin: 20px;
}

.moseo_URL_redirectss {
  margin-top: 2rem;
}

.moseo_url_header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

h3.moseo_url_redirect_heading {
  font-weight: 500;
  font-size: 24px;
  margin: 0;
}

.moseo_url_input_heading {
  display: flex;
  justify-content: space-around;
  color: #2f2f2f;
  background: #dddddd;
  border-radius: 12px 12px 0 0;
}
.moseo_url_input_heading p {
  font-size: 14px;
  color: #2f2f2f;
}

.moseo_url_box {
  background: white;
  border-radius: 12px;
  overflow: visible;
  border: 1px solid #e0e0e0;
}

.moseo_url_input {
  display: flex;
  justify-content: space-between;
  padding: 1.8rem 1.5rem 2.5rem 5rem; /* Extra bottom padding for error messages */
  gap: 10px;
  position: relative;
  align-items: flex-start; /* Align items at top to keep horizontal alignment */
}

.moseo_url_input select {
  background: #fff;
  border-radius: 8px;
  border: 1px solid #dddddd;
}
.moseo_url_input input {
  border: none;
  width: 280px;
  border-radius: 7px;
  outline: none;
  height: 40px;
  font-size: 14px;
  background: transparent;
}

.moseo_url_input input:focus,
.moseo_url_input input:active {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
}

/* Shared wrapper styles for URL and search inputs */
.moseo_url_input_wrapper,
.moseo_search_input_wrapper {
  display: flex;
  align-items: center;
  width: 280px;
  height: 40px; /* Fixed height - no min-height */
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 0 6px;
  background: #F7F8FA;
  transition: background-color 0.2s ease;
  position: relative;
  box-sizing: border-box; /* Include padding and border in height */
}

/* When wrapper has error, keep same height - no padding change */
.moseo_url_input_wrapper.moseo_url_input_error {
  border-color: #EA4335;
  background: #fff5f5;
  height: 40px; /* Same fixed height */
}

.moseo_url_input_wrapper.moseo_url_input_error:focus-within {
  border-color: #EA4335;
  background: #fff5f5;
}

input.moseo_url_input_field,
input#moseo_search_input{
    background-color: transparent;
}
.moseo_url_input_wrapper:focus-within,
.moseo_search_input_wrapper:focus-within {
  background: #ffffff;
  border-color: #024cb9;
}

/* Error messages - absolutely positioned to not break flex layout */
.moseo_url_error {
  color: #EA4335;
  font-size: 12px;
  display: block;
  line-height: 1.4;
  padding: 4px 2px;
  width: 100%;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  z-index: 10;
  background: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  border-radius: 0 0 4px 4px;
  pointer-events: none; /* Don't interfere with interactions */
}

/* Error styles in table cells (edit mode) - use absolute positioning */
td .moseo_url_input_wrapper.moseo_url_input_error {
  height: 40px; /* Same fixed height */
}

td .moseo_url_error {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  margin-top: 4px;
  padding: 4px 2px;
  z-index: 10;
  background: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  border-radius: 0 0 4px 4px;
}

/* Shared input field styles */
.moseo_url_input_field,
.moseo_search_input_field {
  flex: 1;
  border: none !important;
  outline: none !important;
  font-size: 14px;
  color: #2f2f2f !important;
  background: transparent;
  width: auto;
  border-radius: 0;
  padding: 12px 12px !important;
  height: 100%;
  transition: padding 0.2s ease;
}
/* .moseo_search_input_field {
  padding: 6px 12px !important;
  min-height: 24px;
} */

.moseo_url_input_wrapper.focused .moseo_url_input_field {
  padding-right: 12px;
}

.moseo_url_input_field:focus,
.moseo_url_input_field:active,
.moseo_search_input_field:focus,
.moseo_search_input_field:active {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
}

.moseo_url_input_field::placeholder,
.moseo_search_input_field::placeholder {
  color: #999999;
}

/* Shared icon styles */
.moseo_search_icon {
  flex-shrink: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: opacity 0.2s ease;
}

.moseo_search_icon {
  margin-right: 8px;
}

.moseo_url_input_wrapper.focused  {
  display: none;
}


.moseo_select_wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 280px;
}

.moseo_select {
  padding: 10px 45px;
  width: 100%;
  background: #fff;
  border: 1px solid #dddddd;
  border-radius: 8px;
  height: 40px;
  font-size: 14px;
  color: #666666;
  text-align: center;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
}

.moseo_select_icon_left,
.moseo_select_icon_right {
  position: absolute;
  pointer-events: none;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.moseo_select_icon_left {
  left: 12px;
}

.moseo_select_icon_right {
  right: 12px;
}

/* Custom Dropdown */
.moseo_custom_select_wrapper {
  position: relative;
  width: 280px;
  height: 40px; /* Fixed height to match input wrappers */
  box-sizing: border-box;
}
.moseo_inline_select,
.moseo_custom_select_button {
  width: 87%;
  height: 40px;
  padding: 0 45px;
  background: #fff;
  border: 1px solid #DDDDDD;
  border-radius: 8px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  font-size: 14px !important;
  color: var(--moseo-secondary-color) !important;
  transition: border-color 0.2s !important;
}

.moseo_inline_select:focus,
.moseo_inline_select:active {
  outline: none;
  border-color: #024cb9;
}

.moseo_custom_select_button:hover,
.moseo_custom_select_button:focus,
.moseo_custom_select_button[aria-expanded="true"] {
  outline: none;
  border-color: #024cb9;
}

.moseo_custom_select_button[aria-expanded="true"] .moseo_select_icon_right {
  transform: rotate(180deg);
}

.moseo_custom_select_text {
  flex: 1;
  text-align: left;
  color: var(--moseo-secondary-color);
}

.moseo_custom_select_button .moseo_select_icon_left,
.moseo_custom_select_button .moseo_select_icon_right {
  position: absolute;
  pointer-events: none;
}

.moseo_custom_select_button .moseo_select_icon_left {
  left: 12px;
}

.moseo_custom_select_button .moseo_select_icon_right {
  right: 12px;
  transition: transform 0.2s;
}

.moseo_custom_select_dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  list-style: none;
  margin: 0;
  padding: 4px 0;
  z-index: 9999;
  display: none;
  max-height: 200px;
  overflow-y: auto;
  width: 87%;
}


.moseo_custom_select_wrapper.moseo_dropdown_open .moseo_custom_select_dropdown {
  display: block;
}

.moseo_custom_select_option {
  padding: 10px 16px;
  cursor: pointer;
  transition: background-color 0.2s;
  font-size: 14px;
  font-family: var(--moseo-font-family);
  text-align: center;
}

.moseo_custom_select_option:hover,
.moseo_custom_select_option:focus,
.moseo_custom_select_option[aria-selected="true"] {
  outline: none;
  background-color: #e3f2fd;
}

.input:hover {
  border: 2px solid lightgrey;
  box-shadow: 0px 0px 20px -17px;
}

.input:active {
  transform: scale(0.95);
}

.input:focus {
  border: 2px solid grey;
}

.moseo_title {
  font-size: 24px;
  font-weight: 500;
  margin-top: 1rem;
  letter-spacing: var(--moseo-letter-spacing);
}


tr.moseo_redirect_row form {
  display: contents;
}

tr.moseo_redirect_row .moseo_custom_select_wrapper {
    margin: 0 auto;
    max-width: 280px;
}

.moseo_actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  
}

.moseo_actions button {
  background: none;
  border: none;
  padding:0 !important;
  cursor: pointer;
  font-size: 1rem;
}

.moseo_actions button:hover {
  color: #000;
}

.moseo_search {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 2rem 0 0.5rem;
}


.moseo_link {
  color: var(--moseo-secondary-color);
  text-decoration: underline;
  cursor: pointer;
  font-weight: 400;
}

.moseo_edit_form,
.moseo_delete_form {
  display: inline-block;
  margin: 0;
}

/* Pagination Footer */
.moseo_pagination_footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 20px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-top: none;
  margin-top: 2rem;
}

.moseo_pagination_left,
.moseo_pagination_right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.moseo_pagination_checkbox_wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.moseo_row_checkbox_wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.moseo_pagination_checkbox,
.moseo_row_checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.moseo_pagination_checkbox_custom,
.moseo_row_checkbox_custom {
  width: 15px;
  height: 15px;
  border: 2px solid #949494;
  border-radius: 4px;
  background: #fff;
  display: inline-block;
  position: relative;
  transition: all 0.2s ease;
  margin-right: 1rem;
}

.moseo_pagination_checkbox:checked + .moseo_pagination_checkbox_custom,
.moseo_row_checkbox:checked + .moseo_row_checkbox_custom {
  background: #0052CC;
  border-color: #0052CC;
}

.moseo_pagination_checkbox:checked + .moseo_pagination_checkbox_custom::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 0px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.moseo_row_checkbox:checked + .moseo_row_checkbox_custom::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.moseo_pagination_selected_text,
.moseo_pagination_page_text {
  font-size: 14px;
  color: #1E1E1E;
  font-weight: 400;
}

.moseo_pagination_action_btn,
.moseo_pagination_nav_btn {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}

.moseo_pagination_action_btn:hover,
.moseo_pagination_nav_btn:hover {
  opacity: 0.7;
}

.moseo_pagination_action_btn:disabled,
.moseo_pagination_nav_btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.moseo_pagination_action_btn svg,
.moseo_pagination_nav_btn svg {
  display: block;
}

.moseo_pagination_page_dropdown_wrapper {
  position: relative;
  display: inline-block;
}

.moseo_pagination_page_select {
    border: none !important;
    outline: none !important;
}

.moseo_pagination_page_select:hover {
  border-color: #2196F3;
}

.moseo_pagination_page_select:focus {
  border-color: #2196F3;
  box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

.moseo_pagination_dropdown_arrow {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  width: 16px;
  height: 16px;
  z-index: 1;
}
.moseo-modal-buttons {
  display: flex;
  gap: 1rem;
  width: 100%;
  justify-content: end;
}
