/**
 * Dashboard Shortcuts - Admin settings page styles
 *
 * @package Dashboard_Shortcuts
 */

.dashsh-settings-wrap {
  max-width: 1000px;

  --input-min-height: 35px;
  --input-line-height: 1.5;
}

.dashsh-settings-form {
  margin-top: 20px;
}

#dashsh-shortcuts-container {
  background: #fff;
  border: 1px solid #c3c4c7;
  border-radius: 4px;
  padding: 20px;
  margin-bottom: 20px;
}

.dashsh-shortcut-row {
  background: #f6f7f7;
  border: 1px solid #dcdcde;
  border-radius: 4px;
  padding: 15px;
  margin-bottom: 15px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashsh-shortcut-row:hover {
  border-color: #8c8f94;
}

.dashsh-shortcut-row:last-child {
  margin-bottom: 0;
}

.dashsh-shortcut-row.dashsh-sorting {
  opacity: 0.7;
  background: #e3e4e6;
  cursor: move;
}

.dashsh-drag-handle {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: move;
  color: #8c8f94;
  padding: 5px;
  margin-top: 12px;
  transition: color 0.2s ease;
}

.dashsh-drag-handle:hover {
  color: var(--wp-admin-theme-color-darker-10);
}

.dashsh-drag-handle .dashicons {
  width: 20px;
  height: 20px;
  font-size: 20px;
}

.dashsh-shortcut-placeholder {
  background: #e3e4e6;
  border: 2px dashed #8c8f94;
  border-radius: 4px;
  margin-bottom: 15px;
  visibility: visible !important;
}

.dashsh-shortcut-fields {
  display: grid;
  grid-template-columns: 1fr 1fr auto auto;
  gap: 15px;
  align-items: end;
  flex: 1;
}

.dashsh-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 5px;
}

.dashsh-field input[type="text"],
.dashsh-field input[type="url"] {
  width: 100%;
  height: var(--input-min-height);
  min-height: var(--input-min-height);
  line-height: var(--input-line-height);
}

.dashsh-url-input-wrapper {
  display: flex;
  gap: 5px;
  align-items: center;
}

.dashsh-url-input-wrapper .dashsh-url-input {
  flex: 1;
}

.dashsh-url-input-wrapper .dashsh-select-url {
  flex-shrink: 0;
  padding: 3px 8px;
  height: var(--input-min-height);
  min-height: var(--input-min-height);
  min-width: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: var(--input-line-height);
}

.dashsh-field-checkbox {
  display: flex;
  align-items: center;
  padding-bottom: 5px;
  margin-bottom: 9px;
}

.dashsh-field-checkbox label {
  display: flex;
  align-items: center;
  margin: 0;
  font-weight: normal;
}

.dashsh-field-checkbox input[type="checkbox"] {
  margin: 0 5px 0 0;
}

.dashsh-field-actions {
  padding-bottom: 5px;
}

.dashsh-field-actions .dashsh-remove-shortcut {
  background: #dc3232;
  border-color: #ba2525;
  color: #fff;
  padding: 5px 10px;
  height: auto;
  min-height: var(--input-min-height);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.dashsh-remove-shortcut:hover,
.dashsh-remove-shortcut:focus {
  background: #ba2525;
  border-color: #a02222;
  color: #fff;
}

.dashsh-actions {
  margin-bottom: 20px;
}

#dashsh-add-shortcut {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Dashicons overrides */
#dashsh-add-shortcut .dashicons,
#dashsh-shortcuts-container .dashicons {
  width: 18px;
  height: 18px;
  font-size: 18px;
  line-height: 1;
}

/* Empty state */
.dashsh-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #646970;
}

.dashsh-empty-state .dashicons {
  font-size: 48px;
  width: 48px;
  height: 48px;
  opacity: 0.5;
  margin-bottom: 10px;
}

/* Responsive */
@media screen and (max-width: 782px) {
  .dashsh-shortcut-row {
    flex-direction: column;
    gap: 0;
  }

  .dashsh-drag-handle {
    margin-top: 0;
    margin-bottom: 10px;
    align-self: flex-start;
  }

  .dashsh-shortcut-fields {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .dashsh-field-actions {
    padding-bottom: 0;
  }

  .dashsh-remove-shortcut {
    width: 100%;
  }
}
