/**
 * Crowded Collect – Admin settings page styles
 */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&display=swap');

/* Hide WP defaults */
.settings_page_crowded-settings .form-table,
.settings_page_crowded-settings .form-table th,
.settings_page_crowded-settings .form-table td { display: none !important; }
.settings_page_crowded-settings #wpfooter { display: none; }

/* Base */
.crowded-admin-wrap {
  font-family: Manrope, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 20px; font-weight: 500; line-height: 32px; letter-spacing: 0.5px;
  color: #1B1C26; max-width: 1240px; margin: 0; padding: 24px 0 48px 0;
  -webkit-font-smoothing: antialiased;
}
.crowded-admin-wrap *, .crowded-admin-wrap *::before, .crowded-admin-wrap *::after { box-sizing: border-box; }

.crowded-admin-wrap h2 {
  font-family: Manrope, system-ui, sans-serif;
  font-size: 32px; font-weight: 600; line-height: 40px; letter-spacing: 0.5px;
  margin: 0 0 6px 0; padding: 0; color: #1B1C26;
}
.crowded-admin-wrap p {
  font-weight: 300; font-size: 18px; line-height: 28px; color: #1B1C26; margin: 0 0 18px 0;
}

/* Header */
.crowded-header { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.crowded-header__logo { display: flex; align-items: center; gap: 8px; }
.crowded-header__title {
  font-family: Manrope, system-ui, sans-serif;
  font-size: 30px; font-weight: 800; line-height: 24px; letter-spacing: 0.2px; color: #1D5AF2;
}

/* Card */
.crowded-card { border: 1px solid #AEAEAE; border-radius: 12px; background: #fff; margin-bottom: 20px; overflow: hidden; }
.crowded-card__inner { padding: 28px 28px 24px 28px; }

/* Intro card 50/50 */
.crowded-card--intro { display: flex; gap: 28px; align-items: stretch; }
.crowded-card__text {
  flex: 1 1 50%; min-width: 0;
  display: flex; flex-direction: column; justify-content: center;
}
.crowded-card__text h2 { margin-bottom: 10px; }
.crowded-card__text p { margin-bottom: 20px; }
.crowded-card__image {
  flex: 1 1 50%; min-height: 200px; border-radius: 10px; overflow: hidden;
  background: #e8efff; display: flex; align-items: center; justify-content: center;
}
.crowded-card__image img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Buttons */
.crowded-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 64px; cursor: pointer;
  font-family: Manrope, system-ui, sans-serif; font-weight: 600;
  font-size: 14px; line-height: 20px; letter-spacing: 0.5px;
  text-decoration: none; transition: background-color .15s, box-shadow .15s;
}
.crowded-btn--primary { background-color: #1D5AF2; color: #fff; padding: 10px 24px; }
.crowded-btn--primary:hover, .crowded-btn--primary:focus { background-color: #1549cc; color: #fff; }
.crowded-btn--primary:focus { outline: 2px solid rgba(29,90,242,.35); outline-offset: 2px; }
.crowded-btn--small { padding: 8px 20px; font-size: 13px; }
.crowded-btn--save { padding: 12px 36px; font-size: 15px; }

/* Icon buttons */
.crowded-icon-btn {
  width: 38px; height: 38px; min-width: 38px;
  border: 1px solid #E7EDFC; border-radius: 8px; background: #E7EDFC; color: #1D5AF2;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: background-color .15s, border-color .15s; padding: 0; flex-shrink: 0;
}
.crowded-icon-btn:hover { background: #d6e1fa; border-color: #1D5AF2; }
.crowded-icon-btn--danger { color: #E22D20; background: #FBD7D5; border-color: #E22D20; }
.crowded-icon-btn--danger:hover { background: #f5bfbc; border-color: #E22D20; }

/* Copied tooltip */
.crowded-copy { position: relative; }
.crowded-copy.crowded-copied::after {
  content: "Copied!"; position: absolute; top: -34px; left: 50%; transform: translateX(-50%);
  background: #1d2327; color: #fff; padding: 5px 10px; border-radius: 6px;
  font-size: 11px; line-height: 1; white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,.15); z-index: 9999; pointer-events: none;
}
.crowded-copy.crowded-copied::before {
  content: ""; position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: #1d2327; z-index: 9999; pointer-events: none;
}

/* Button customize controls */
.crowded-btn-controls { display: flex; flex-direction: column; gap: 20px; margin-bottom: 28px; }

/* Fields */
.crowded-field { display: flex; flex-direction: column; gap: 8px; }
.crowded-field__label { font-weight: 700; font-size: 16px; color: #1B1C26; }
.crowded-field__input {
  height: 48px; border: 1px solid #AEAEAE; border-radius: 10px;
  padding: 0 16px; font-family: Manrope, system-ui, sans-serif;
  font-size: 15px; font-weight: 500; color: #1B1C26; outline: none; transition: border-color .15s;
  width: 240px; background: #fff;
}
.crowded-field__input:focus { border-color: #1D5AF2; box-shadow: 0 0 0 2px rgba(29,90,242,.15); }
#crowded-btn-radius,
#crowded-btn-radius:focus,
#crowded-btn-radius:active,
#crowded-btn-radius:hover {
  border: 0 !important; box-shadow: none !important; outline: none !important;
  background: transparent; width: auto; flex: 1; height: 100%; border-radius: 0;
}
.crowded-field__unit {
  padding: 0 16px; border-left: 1px solid #AEAEAE; height: 100%;
  display: flex; align-items: center; font-weight: 600; color: #1D5AF2;
  font-size: 14px; background: #f8f9fb;
}

/* Color wrap */
.crowded-color-wrap {
  display: inline-flex; align-items: center; position: relative;
  border: 1px solid #AEAEAE; border-radius: 10px; overflow: visible; width: 240px; height: 48px;
  background: #fff;
}
.crowded-color-swatch {
  width: 48px; height: 46px; flex-shrink: 0; cursor: pointer; border: none;
  border-right: 1px solid #AEAEAE; border-radius: 9px 0 0 9px;
}
.crowded-color-pick {
  flex: 1; height: 100%; border: 0; border-radius: 0 9px 9px 0;
  background: #fff; color: #1D5AF2; font-family: Manrope, system-ui, sans-serif;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: background-color .15s;
  padding: 0 16px; text-align: center;
}
.crowded-color-pick:hover { background: #f0f4ff; }

/* Radius wrap */
.crowded-radius-wrap {
  display: inline-flex; align-items: center;
  border: 1px solid #AEAEAE; border-radius: 10px; overflow: hidden; width: 240px; height: 48px;
  background: #fff;
}

/* Color picker popup */
.crowded-picker-popup {
  position: absolute; z-index: 999999; background: #fff; border: 1px solid #ddd;
  border-radius: 12px; padding: 16px; box-shadow: 0 8px 24px rgba(0,0,0,.15);
  display: none; flex-direction: column; gap: 10px; top: 56px; left: 0;
}
.crowded-picker-popup.is-open { display: flex; }
.crowded-picker-sv-wrap, .crowded-picker-hue-wrap { position: relative; display: inline-block; }
.crowded-picker-popup canvas { border-radius: 6px; cursor: crosshair; display: block; }
.crowded-picker-sv-marker {
  position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.3), 0 2px 6px rgba(0,0,0,.4);
  pointer-events: none; transform: translate(-9px, -9px);
}
.crowded-picker-hue-marker {
  position: absolute; width: 16px; height: 18px; border-radius: 4px;
  border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.3), 0 2px 6px rgba(0,0,0,.4);
  pointer-events: none; top: -2px; transform: translateX(-8px);
}
.crowded-picker-hex-row { display: flex; align-items: center; gap: 8px; }
.crowded-picker-hex-row span { font-size: 13px; font-weight: 600; color: #666; }
.crowded-picker-hex-input {
  flex: 1; height: 34px; border: 1px solid #ddd; border-radius: 8px;
  padding: 0 10px; font-family: monospace; font-size: 14px; font-weight: 500; outline: none;
}
.crowded-picker-hex-input:focus { border-color: #1D5AF2; }

/* Button preview */
.crowded-btn-preview-area {
  margin-bottom: 24px; padding: 20px; background: #f8f9fa;
  border-radius: 10px; text-align: center;
}
.crowded-btn-preview-label { font-size: 12px; color: #888; margin: 0 0 10px; }
#crowded-btn-live-preview {
  padding: 14px 32px; border: 0; font-size: 16px; font-weight: 600;
  cursor: pointer; font-family: Manrope, system-ui, sans-serif;
}

/* Implement section */
.crowded-implement-section { border-top: 1px solid #e5e5e5; padding-top: 24px; }
.crowded-implement-section h3 {
  font-family: Manrope, system-ui, sans-serif;
  font-size: 24px; font-weight: 600; margin: 0 0 6px 0; color: #1B1C26;
}
.crowded-implement-section p { margin-bottom: 14px; }

/* Collection rows */
.crowded-rows { margin-bottom: 14px; }
.crowded-row { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.crowded-input {
  flex: 1; min-width: 260px; height: 40px; border: 1px solid #AEAEAE; border-radius: 8px;
  padding: 0 14px; font-family: Manrope, system-ui, sans-serif;
  font-size: 14px; font-weight: 500; color: #1B1C26; outline: none; transition: border-color .15s;
}
.crowded-input:focus { border-color: #1D5AF2; box-shadow: 0 0 0 2px rgba(29,90,242,.15); }
.crowded-input::placeholder { color: #aaa; font-weight: 400; }
.crowded-shortcode {
  white-space: nowrap; background: #f5f5f5; padding: 8px 12px; border-radius: 8px;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 12px; font-weight: 500; color: #555; border: 1px solid #e5e5e5; line-height: 20px;
}

/* Save row */
.crowded-save-row { display: flex; justify-content: flex-end; margin-top: 8px; }