/* ==========================================================================
   Graphic Resort - AI Background Remover
   Same design system as the Image Enhancer plugin: white background,
   deep blue + orange accents, matching graphicresort.com brand.
   ========================================================================== */

.grbr-app{
  --grbr-ink:#0F1720;
  --grbr-slate:#5B6472;
  --grbr-blue:#1B4C8C;
  --grbr-blue-deep:#0B2545;
  --grbr-blue-light:#EAF1FB;
  --grbr-accent:#FF7A33;
  --grbr-accent-deep:#E85D04;
  --grbr-ice:#F6F9FD;
  --grbr-white:#FFFFFF;
  --grbr-line:#E6ECF3;
  --grbr-radius-lg:22px;
  --grbr-radius-md:16px;
  --grbr-radius-sm:12px;
  --grbr-shadow-sm:0 8px 22px -14px rgba(11,37,69,.28);
  --grbr-shadow-md:0 22px 44px -20px rgba(11,37,69,.3);
  --grbr-shadow-lg:0 32px 64px -24px rgba(11,37,69,.38);

  background:#F6F6F6;
  color:var(--grbr-ink);
  font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  font-size:17px;
  max-width:1300px;
  margin:0 auto;
  padding:22px 20px 26px;
  border-radius:26px;
  line-height:1.6;
}
.grbr-app.grbr-sharp{ --grbr-radius-lg:6px; --grbr-radius-md:4px; --grbr-radius-sm:2px; }
.grbr-app *{ box-sizing:border-box; }
.grbr-app h1, .grbr-app h2, .grbr-app h3{
  font-family:'Space Grotesk','Inter',sans-serif; font-weight:700; letter-spacing:-0.01em; color:var(--grbr-blue-deep); margin:0;
}
.grbr-app button{ font-family:inherit; }
.grbr-app svg{ display:block; }

.grbr-head{ text-align:center; margin-bottom:32px; }
.grbr-badge{
  display:inline-flex; align-items:center; gap:8px; font-size:14px; font-weight:600; color:var(--grbr-accent-deep);
  background:rgba(255,122,51,.1); border-radius:999px; padding:7px 16px 7px 12px; margin-bottom:16px;
}
.grbr-badge .grbr-dot{ width:7px; height:7px; border-radius:50%; background:var(--grbr-accent); flex-shrink:0; }
.grbr-head h1{ font-size:clamp(24px,3.4vw,34px); margin-bottom:10px; }
.grbr-head p{ color:var(--grbr-slate); font-size:16px; max-width:560px; margin:0 auto; }

.grbr-grid{ display:grid; grid-template-columns:1.5fr 1fr; gap:24px; align-items:start; }
@media (max-width:960px){ .grbr-grid{ grid-template-columns:1fr; } }

.grbr-card{ background:var(--grbr-white); border:1px solid var(--grbr-line); border-radius:var(--grbr-radius-lg); padding:26px; box-shadow:var(--grbr-shadow-sm); margin-bottom:20px; }
.grbr-card-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:18px; gap:12px; }
.grbr-card h2{ font-size:18px; margin:0; }

.grbr-text-btn{
  display:inline-flex; align-items:center; gap:7px; background:var(--grbr-blue-light); color:var(--grbr-blue-deep);
  border:none; border-radius:999px; padding:8px 15px; font-size:13px; font-weight:600; cursor:pointer;
  transition:background .15s ease, transform .15s ease;
}
.grbr-text-btn svg{ width:15px; height:15px; }
.grbr-text-btn:hover{ background:#dfeaf9; transform:translateY(-1px); }
.grbr-text-btn[aria-pressed="true"]{ background:var(--grbr-accent); color:#fff; }

/* preview */
.grbr-preview-box{
  position:relative; background:var(--grbr-white); border:1px solid var(--grbr-line); border-radius:var(--grbr-radius-lg);
  min-height:520px; display:flex; align-items:center; justify-content:center; overflow:hidden; box-shadow:var(--grbr-shadow-md);
}
.grbr-preview-box.grbr-checkerboard .grbr-canvas-stage{
  background-image:
    linear-gradient(45deg,#e9edf3 25%,transparent 25%), linear-gradient(-45deg,#e9edf3 25%,transparent 25%),
    linear-gradient(45deg,transparent 75%,#e9edf3 75%), linear-gradient(-45deg,transparent 75%,#e9edf3 75%);
  background-size:20px 20px; background-position:0 0,0 10px,10px -10px,-10px 0;
}
.grbr-dropzone{
  width:100%; min-height:460px; margin:20px; border:2px dashed #C9D6E6; border-radius:var(--grbr-radius-md);
  display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; cursor:pointer; padding:30px;
  transition:border-color .18s ease, background .18s ease;
}
.grbr-dropzone:hover, .grbr-dropzone.grbr-drag{ border-color:var(--grbr-accent); background:rgba(255,122,51,.05); }
.grbr-drop-icon{
  width:60px; height:60px; border-radius:16px; background:linear-gradient(135deg,var(--grbr-blue),var(--grbr-blue-deep));
  color:#fff; display:flex; align-items:center; justify-content:center; margin-bottom:20px; box-shadow:0 14px 26px -12px rgba(11,37,69,.45);
}
.grbr-dropzone h3{ font-size:19px; margin-bottom:6px; }
.grbr-dropzone p{ color:var(--grbr-slate); font-size:14px; margin:0; }

.grbr-canvas-wrap{ width:100%; height:100%; min-height:520px; display:none; align-items:center; justify-content:center; overflow:hidden; padding:22px; }
.grbr-preview-box.grbr-has-image .grbr-dropzone{ display:none; }
.grbr-preview-box.grbr-has-image .grbr-canvas-wrap{ display:flex; }

.grbr-canvas-stage{ position:relative; margin:auto; transition:transform .12s ease; touch-action:none; }
.grbr-canvas-stage canvas{ display:block; max-width:100%; border-radius:8px; position:absolute; top:0; left:0; }
.grbr-canvas-stage [data-grbr-bg-canvas]{ position:static; z-index:1; }
.grbr-canvas-stage [data-grbr-canvas]{ z-index:2; }
.grbr-canvas-before{ z-index:3; clip-path:inset(0 50% 0 0); display:none; }
.grbr-preview-box.grbr-comparing .grbr-canvas-before{ display:block; }

.grbr-compare-divider{ position:absolute; top:0; bottom:0; left:50%; width:3px; background:#fff; box-shadow:0 0 0 1px rgba(0,0,0,.12); display:none; pointer-events:none; z-index:4; }
.grbr-compare-handle{
  position:absolute; top:50%; left:50%; width:40px; height:40px; border-radius:50%; background:var(--grbr-blue-deep);
  transform:translate(-50%,-50%); display:none; align-items:center; justify-content:center; cursor:ew-resize;
  box-shadow:0 10px 22px rgba(0,0,0,.28); pointer-events:auto; z-index:5;
}
.grbr-preview-box.grbr-comparing .grbr-compare-divider, .grbr-preview-box.grbr-comparing .grbr-compare-handle{ display:flex; }

.grbr-brush-cursor{
  position:absolute; border:2px solid var(--grbr-accent); border-radius:50%; pointer-events:none; z-index:6;
  transform:translate(-50%,-50%); background:rgba(255,122,51,.12);
}

.grbr-processing{
  position:absolute; inset:0; background:rgba(255,255,255,.85); display:flex; align-items:center; justify-content:center;
  gap:10px; font-weight:600; color:var(--grbr-blue-deep); z-index:10; border-radius:var(--grbr-radius-lg);
}
.grbr-spinner{ width:20px; height:20px; border-radius:50%; border:3px solid var(--grbr-line); border-top-color:var(--grbr-accent); animation:grbr-spin .7s linear infinite; }
@keyframes grbr-spin{ to{ transform:rotate(360deg); } }

.grbr-float-actions{ position:absolute; top:20px; right:20px; display:flex; gap:9px; z-index:8; }
.grbr-chip{
  display:inline-flex; align-items:center; gap:7px; background:rgba(255,255,255,.95); backdrop-filter:blur(6px);
  border:1px solid var(--grbr-line); color:var(--grbr-blue-deep); border-radius:999px; padding:9px 15px; font-size:13px; font-weight:600;
  cursor:pointer; box-shadow:var(--grbr-shadow-sm); transition:transform .15s ease, border-color .15s ease;
}
.grbr-chip:hover{ transform:translateY(-2px); border-color:var(--grbr-accent); color:var(--grbr-accent-deep); }

.grbr-toolbar{
  display:flex; flex-wrap:wrap; gap:12px; align-items:center; background:var(--grbr-white); border:1px solid var(--grbr-line);
  border-radius:var(--grbr-radius-md); padding:12px 14px; margin-top:16px; box-shadow:var(--grbr-shadow-sm);
}
.grbr-toolbar-group{ display:flex; align-items:center; gap:5px; padding-right:12px; border-right:1px solid var(--grbr-line); }
.grbr-toolbar-group:last-child{ border-right:none; }
.grbr-toolbar button{
  border:none; background:transparent; color:var(--grbr-slate); width:40px; height:40px; border-radius:11px;
  display:flex; align-items:center; justify-content:center; cursor:pointer; transition:background .15s ease, color .15s ease;
  font-size:13px; font-weight:600; padding:0 12px;
}
.grbr-toolbar button svg{ width:18px; height:18px; }
.grbr-toolbar button[data-grbr-action="zoom-fit"], .grbr-toolbar button[data-grbr-action="zoom-100"], .grbr-toolbar button[data-grbr-action="compare-toggle"]{ width:auto; }
.grbr-toolbar button:hover:not(:disabled){ background:var(--grbr-blue-light); color:var(--grbr-blue-deep); }
.grbr-toolbar button:disabled{ opacity:.35; cursor:not-allowed; }
.grbr-toolbar button.grbr-active{ background:var(--grbr-accent); color:#fff; }
.grbr-zoom-val{ font-size:13px; color:var(--grbr-slate); font-weight:600; width:48px; text-align:center; }
.grbr-toolbar-tip-wrap{ display:flex; align-items:center; gap:2px; }

.grbr-info-tip{
  position:relative; display:inline-flex; align-items:center; justify-content:center; width:26px; height:26px; border-radius:50%;
  color:var(--grbr-slate); cursor:help; background:var(--grbr-ice); flex-shrink:0;
}
.grbr-info-tip svg{ width:16px; height:16px; }
.grbr-info-tip .grbr-tip-bubble{
  position:absolute; bottom:calc(100% + 10px); left:50%; transform:translateX(-50%) translateY(6px);
  background:var(--grbr-blue-deep); color:#fff; font-size:13px; font-weight:500; line-height:1.5; padding:12px 14px;
  border-radius:12px; width:250px; text-align:left; box-shadow:0 16px 32px -10px rgba(11,37,69,.5);
  opacity:0; visibility:hidden; transition:opacity .18s ease, transform .18s ease; z-index:20;
}
.grbr-info-tip:hover .grbr-tip-bubble, .grbr-info-tip:focus .grbr-tip-bubble, .grbr-info-tip.grbr-tip-open .grbr-tip-bubble{
  opacity:1; visibility:visible; transform:translateX(-50%) translateY(0);
}

.grbr-info-row{ display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-top:16px; }
.grbr-info-chip{ background:var(--grbr-ice); border:1px solid var(--grbr-line); border-radius:var(--grbr-radius-sm); padding:12px 14px; text-align:center; }
.grbr-info-chip span{ display:block; font-size:12px; color:var(--grbr-slate); margin-bottom:4px; }
.grbr-info-chip b{ font-size:14px; color:var(--grbr-blue-deep); }
@media (max-width:560px){ .grbr-info-row{ grid-template-columns:repeat(2,1fr); } }

/* right panel controls */
.grbr-control{ margin-bottom:20px; }
.grbr-control label{ display:flex; justify-content:space-between; font-size:14px; color:var(--grbr-slate); margin-bottom:9px; font-weight:500; }
.grbr-val{ color:var(--grbr-accent-deep); font-weight:700; font-variant-numeric:tabular-nums; }
.grbr-label-block{ display:block; font-size:14px; color:var(--grbr-slate); font-weight:500; margin-bottom:10px; }

input[type="range"]{
  -webkit-appearance:none; appearance:none; width:100%; height:7px; border-radius:999px;
  background:linear-gradient(90deg,var(--grbr-blue) var(--grbr-fill,50%),var(--grbr-line) var(--grbr-fill,50%)); outline:none; cursor:pointer;
}
input[type="range"]::-webkit-slider-thumb{
  -webkit-appearance:none; width:22px; height:22px; border-radius:50%; background:#fff; border:4px solid var(--grbr-blue-deep);
  cursor:pointer; box-shadow:0 2px 10px rgba(11,37,69,.4);
}
input[type="range"]::-moz-range-thumb{ width:22px; height:22px; border-radius:50%; background:#fff; border:4px solid var(--grbr-blue-deep); cursor:pointer; }
input[type="range"]::-moz-range-track{ height:7px; border-radius:999px; background:var(--grbr-line); }
input[type="color"]{ width:100%; height:44px; border:1px solid var(--grbr-line); border-radius:var(--grbr-radius-sm); cursor:pointer; background:none; }
.grbr-color-row{ display:flex; gap:10px; margin-bottom:16px; }
.grbr-color-row input[type="color"]{ flex:1; }

.grbr-segmented{ display:flex; gap:7px; margin-bottom:18px; flex-wrap:wrap; }
.grbr-segmented button{
  flex:1; min-width:80px; text-align:center; padding:11px 8px; border:1px solid var(--grbr-line); background:var(--grbr-white);
  border-radius:var(--grbr-radius-sm); font-size:13.5px; font-weight:600; color:var(--grbr-slate); cursor:pointer; transition:all .15s ease;
}
.grbr-segmented button:hover{ border-color:var(--grbr-blue); }
.grbr-segmented button.grbr-active{
  border-color:transparent; color:#fff; background:linear-gradient(135deg,var(--grbr-blue),var(--grbr-blue-deep));
  box-shadow:0 10px 22px -8px rgba(27,76,140,.5);
}
.grbr-bg-options{ padding-top:4px; }
.grbr-refine-body{ padding-top:4px; }

.grbr-quick-actions-row{ margin-bottom:20px; }

.grbr-btn{
  font-weight:700; font-size:15.5px; padding:15px 24px; border-radius:999px; border:none; cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center; gap:9px; transition:transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.grbr-btn:disabled{ opacity:.4; cursor:not-allowed; transform:none !important; }
.grbr-w-100{ width:100%; }
.grbr-btn-primary{ background:linear-gradient(135deg,var(--grbr-accent),var(--grbr-accent-deep)); color:#fff; box-shadow:0 18px 34px -10px rgba(232,93,4,.55); }
.grbr-btn-primary:hover:not(:disabled){ transform:translateY(-3px); box-shadow:0 22px 40px -10px rgba(232,93,4,.6); }
.grbr-btn-ghost{ background:var(--grbr-white); border:1.5px solid var(--grbr-line); color:var(--grbr-blue-deep); }
.grbr-btn-ghost:hover:not(:disabled){ border-color:var(--grbr-accent); color:var(--grbr-accent-deep); }

.grbr-note{ font-size:13px; color:var(--grbr-slate); text-align:center; margin-top:16px; line-height:1.7; }

.grbr-spinner-btn{ width:18px; height:18px; border-radius:50%; border:2.5px solid rgba(255,255,255,.4); border-top-color:#fff; animation:grbr-spin .7s linear infinite; }
.grbr-progress{ height:5px; background:var(--grbr-line); border-radius:999px; margin-top:16px; overflow:hidden; }
.grbr-progress-bar{ height:100%; width:0%; background:linear-gradient(90deg,var(--grbr-blue),var(--grbr-accent)); transition:width .2s ease; }

.grbr-download-bar{ margin-top:8px; padding:30px 0 6px; text-align:center; }
.grbr-download-inner{ display:flex; align-items:flex-end; justify-content:center; gap:18px; flex-wrap:wrap; }
.grbr-download-option{ text-align:left; min-width:160px; }
.grbr-download-option label{ display:flex; justify-content:space-between; font-size:13.5px; color:var(--grbr-slate); font-weight:500; margin-bottom:9px; }
.grbr-download-option select{
  width:100%; padding:14px 16px; border-radius:var(--grbr-radius-sm); border:1px solid var(--grbr-line);
  background:var(--grbr-white); font-size:15px; font-weight:600; color:var(--grbr-blue-deep); cursor:pointer;
}
.grbr-quality-option{ width:190px; }
.grbr-download-btn{ padding:17px 36px; font-size:16.5px; }

.grbr-preview-box:fullscreen{ background:#0B0D12; border-radius:0; }
.grbr-preview-box:fullscreen .grbr-canvas-wrap{ min-height:100vh; }

@media (max-width:640px){
  .grbr-app{ padding:14px 10px; font-size:16px; }
  .grbr-card{ padding:20px; }
  .grbr-preview-box{ min-height:360px; }
  .grbr-dropzone{ min-height:300px; margin:14px; padding:22px; }
  .grbr-canvas-wrap{ min-height:360px; padding:14px; }
  .grbr-download-inner{ flex-direction:column; align-items:stretch; }
  .grbr-quality-option{ width:100%; }
  .grbr-toolbar-group{ padding-right:8px; }
  .grbr-info-tip .grbr-tip-bubble{ width:210px; }
}
