/* Instagram image resizer — builds on tools-csv-split.css */

.tools-ig-resize-presets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .tools-ig-resize-presets {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.tools-ig-resize-preset {
  appearance: none;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.7rem;
  text-align: left;
  border: 1px solid #d7dde8;
  background: #fff;
  color: #374151;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.tools-ig-resize-preset:hover {
  border-color: #060663;
  color: #060663;
}

.tools-ig-resize-preset.is-active {
  border-color: #060663;
  background: #060663;
  color: #fff;
}

.tools-ig-resize-preset:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(6, 6, 99, 0.12);
}

.tools-ig-resize-preset-visual {
  flex: 0 0 2.5rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tools-ig-resize-phone {
  box-sizing: border-box;
  display: block;
  border: 2px solid currentColor;
  border-radius: 5px;
  position: relative;
  background: transparent;
}

.tools-ig-resize-phone::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 2px;
  width: 28%;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: translateX(-50%);
  opacity: 0.55;
}

.tools-ig-resize-phone--square {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 4px;
}

.tools-ig-resize-phone--square::before {
  display: none;
}

.tools-ig-resize-phone--portrait {
  width: 1.35rem;
  height: 1.7rem;
  border-radius: 5px;
}

.tools-ig-resize-phone--landscape {
  width: 2rem;
  height: 1.05rem;
  border-radius: 3px;
}

.tools-ig-resize-phone--landscape::before {
  top: 50%;
  left: 2px;
  width: 2px;
  height: 28%;
  transform: translateY(-50%);
}

.tools-ig-resize-phone--story,
.tools-ig-resize-phone--reel {
  width: 1.05rem;
  height: 1.9rem;
  border-radius: 6px;
}

.tools-ig-resize-phone--reel::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 0.28rem;
  height: 0.28rem;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  transform: translateX(-50%);
  opacity: 0.7;
}

.tools-ig-resize-phone--profile {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
}

.tools-ig-resize-phone--profile::before {
  display: none;
}

.tools-ig-resize-preset-copy {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.tools-ig-resize-preset-label {
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.25;
}

.tools-ig-resize-preset-meta {
  font-size: 0.75rem;
  opacity: 0.8;
  font-variant-numeric: tabular-nums;
}

.tools-ig-resize-fields .form-control,
.tools-ig-resize-fields .custom-select {
  height: calc(1.5em + 0.85rem + 2px);
  padding: 0.425rem 0.85rem;
  border-radius: 8px;
  border-color: #d7dde8;
  background: #fff;
  box-shadow: none;
}

.tools-ig-resize-fields .form-control:focus,
.tools-ig-resize-fields .custom-select:focus {
  border-color: #060663;
  box-shadow: 0 0 0 3px rgba(6, 6, 99, 0.1);
}

@media (min-width: 700px) {
  .tools-ig-resize-page .tools-ig-resize-fields {
    grid-template-columns: 1fr 1fr;
  }
}

.tools-ig-resize-preview-shell {
  margin-top: 0.35rem;
}

.tools-ig-resize-size-label {
  margin: 0 0 0.55rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #1a1a2e;
}

.tools-ig-resize-preview-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 12rem;
  padding: 0.85rem;
  border-radius: 12px;
  border: 1px solid #e8edf5;
  background:
    linear-gradient(45deg, #eef1f6 25%, transparent 25%) 0 0 / 16px 16px,
    linear-gradient(-45deg, #eef1f6 25%, transparent 25%) 0 8px / 16px 16px,
    linear-gradient(45deg, transparent 75%, #eef1f6 75%) 8px -8px / 16px 16px,
    linear-gradient(-45deg, transparent 75%, #eef1f6 75%) -8px 0 / 16px 16px,
    #f7f8fb;
}

.tools-ig-resize-preview-wrap.is-draggable {
  cursor: grab;
}

.tools-ig-resize-preview-wrap.is-dragging {
  cursor: grabbing;
}

.tools-ig-resize-preview {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  background: #111;
}

.tools-ig-resize-preview-meta {
  margin: 0.55rem 0 0;
  font-size: 0.8125rem;
  color: #6b7280;
}

.tools-ig-resize-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.tools-ig-resize-zoom-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tools-ig-resize-zoom-row input[type='range'] {
  flex: 1;
}

.tools-ig-resize-zoom-value {
  min-width: 3.25rem;
  text-align: right;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #4b5563;
  font-variant-numeric: tabular-nums;
}

.tools-ig-resize-guide {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
}

.tools-ig-resize-guide th,
.tools-ig-resize-guide td {
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid #e8edf5;
  text-align: left;
  font-size: 0.9rem;
  vertical-align: top;
}

.tools-ig-resize-guide th {
  font-weight: 700;
  color: #1a1a2e;
}

.tools-ig-resize-guide td {
  color: #4b5563;
}

.tools-ig-resize-page .tools-follower-lead code,
.tools-ig-resize-page .tools-csv-split-reasons code,
.tools-ig-resize-page .tools-csv-split-steps code {
  font-size: 0.9em;
  padding: 0.08em 0.3em;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.05);
  color: #2d3748;
}
