/* Modal de crop da logo da empresa — quadrado + zoom estilo WhatsApp */

.fw-logo-crop-overlay {
  position: fixed;
  inset: 0;
  z-index: 10080;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  background-color: rgba(15, 23, 42, 0.52);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: fw-logo-crop-fadeIn 0.2s ease;
}

@keyframes fw-logo-crop-fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fw-logo-crop-modal {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  animation: fw-logo-crop-slideIn 0.25s ease;
  font-family: "Inter Tight", Inter, system-ui, -apple-system, sans-serif;
}

@keyframes fw-logo-crop-slideIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(-8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.fw-logo-crop-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e2e8f0;
}

.fw-logo-crop-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.fw-logo-crop-subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: #64748b;
  line-height: 1.4;
}

.fw-logo-crop-close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  margin: -4px -8px 0 0;
  padding: 0;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.fw-logo-crop-close:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.fw-logo-crop-body {
  padding: 20px 24px 18px;
}

.fw-logo-crop-stage {
  position: relative;
  width: 100%;
  height: min(360px, 52vw);
  min-height: 260px;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border-radius: 14px;
  overflow: hidden;
}

.fw-logo-crop-stage img {
  display: block;
  max-width: 100%;
}

.fw-logo-crop-stage .cropper-container {
  width: 100% !important;
  height: 100% !important;
}

.fw-logo-crop-stage .cropper-view-box {
  outline: 2px solid rgba(255, 255, 255, 0.95);
  outline-offset: -2px;
  border-radius: 2px;
}

.fw-logo-crop-stage .cropper-face {
  background-color: transparent;
}

.fw-logo-crop-stage .cropper-line,
.fw-logo-crop-stage .cropper-point {
  display: none;
}

.fw-logo-crop-zoom {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.fw-logo-crop-zoom-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.fw-logo-crop-zoom-btn .material-symbols-outlined {
  font-size: 22px;
}

.fw-logo-crop-zoom-btn:hover {
  border-color: color-mix(in srgb, var(--fw-community-primary, #16a34a) 40%, #e2e8f0);
  color: var(--fw-community-primary, #16a34a);
  background: #fff;
}

.fw-logo-crop-zoom-btn:active {
  transform: scale(0.96);
}

.fw-logo-crop-zoom-btn:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--fw-community-primary, #16a34a) 50%, transparent);
  outline-offset: 2px;
}

.fw-logo-crop-zoom-range {
  flex: 1 1 auto;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
  outline: none;
  cursor: pointer;
}

.fw-logo-crop-zoom-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--fw-community-primary, #16a34a);
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
  cursor: grab;
}

.fw-logo-crop-zoom-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--fw-community-primary, #16a34a);
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
  cursor: grab;
}

.fw-logo-crop-hint {
  margin: 12px 0 0;
  font-size: 12px;
  color: #64748b;
  text-align: center;
  line-height: 1.4;
}

.fw-logo-crop-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px 20px;
  background: #fafbfc;
  border-top: 1px solid #e2e8f0;
}

.fw-logo-crop-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 20px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.fw-logo-crop-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.fw-logo-crop-btn--secondary {
  color: #475569;
  background: #fff;
  border: 1.5px solid #e2e8f0;
}

.fw-logo-crop-btn--secondary:hover:not(:disabled) {
  background: #f8fafc;
}

.fw-logo-crop-btn--primary {
  color: #fff;
  background: var(--fw-community-primary, #16a34a);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--fw-community-primary, #16a34a) 35%, transparent);
}

.fw-logo-crop-btn--primary:hover:not(:disabled) {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.fw-logo-crop-btn--primary .material-symbols-outlined {
  font-size: 20px;
}

.fw-logo-crop-btn:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--fw-community-primary, #16a34a) 50%, transparent);
  outline-offset: 2px;
}

@media (max-width: 520px) {
  .fw-logo-crop-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .fw-logo-crop-modal {
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    max-height: 96vh;
    overflow-y: auto;
  }

  .fw-logo-crop-stage {
    min-height: 220px;
    height: 48vh;
  }
}
