/* ============================================
   Ratho Design Review — Shared Styles
   ============================================ */

/* --- Review Banner (top bar above mockup) --- */
.review-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: #0f172a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 99999;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.review-banner a { color: #94a3b8; text-decoration: none; transition: color 0.15s; }
.review-banner a:hover { color: #fff; }
.review-banner a.active { color: #fd761a; font-weight: 600; }

.review-banner__left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.review-banner__left img {
  height: 18px;
  width: auto;
  filter: brightness(0) invert(1);
}

.review-banner__left span {
  font-weight: 700;
  font-size: 11px;
  color: #fd761a;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.review-banner__center {
  display: flex;
  align-items: center;
  gap: 2px;
  justify-content: center;
  flex: 1;
  min-width: 0;
}

.review-banner__center > a {
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.review-banner__center > a:hover {
  background: rgba(255,255,255,0.08);
}

.review-banner__group {
  position: relative;
}

.review-banner__group-label {
  padding: 4px 8px;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.15s;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.review-banner__group-label:hover {
  background: rgba(255,255,255,0.1);
}

.review-banner__group-label::after {
  content: '\25BE';
  font-size: 10px;
  opacity: 0.5;
}

.review-banner__dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #1e293b;
  border-radius: 8px;
  padding: 4px;
  min-width: 180px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  z-index: 2147483647;
}

/* Dropdowns are opened via JS click handler (style.display = 'block') */

.review-banner__dropdown a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  white-space: nowrap;
}

.review-banner__dropdown a:hover {
  background: rgba(255,255,255,0.08);
}

.review-banner__right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.review-banner__mode-btn {
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.2);
  background: transparent;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.review-banner__mode-btn:hover {
  border-color: #fd761a;
  color: #fd761a;
}

.review-banner__mode-btn.active {
  background: #fd761a;
  border-color: #fd761a;
  color: #fff;
}

.review-banner__export-btn {
  padding: 4px 10px;
  border-radius: 4px;
  border: none;
  background: #1e293b;
  color: #94a3b8;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.review-banner__export-btn:hover {
  background: #334155;
  color: #fff;
}

/* --- Push mockup content down --- */
body.has-review-banner {
  padding-top: 40px !important;
}

/* Offset fixed-positioned navs inside mockup */
body.has-review-banner > nav,
body.has-review-banner > header {
  top: 40px !important;
}

/* Fix for navs that are fixed with top:0 */
body.has-review-banner nav.fixed,
body.has-review-banner nav[style*="fixed"],
body.has-review-banner header.fixed {
  top: 40px !important;
}

/* --- Annotation Canvas Overlay --- */
.annotation-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  pointer-events: none;
  z-index: 9998;
}

.annotation-wrapper.annotate-mode {
  pointer-events: auto;
  cursor: crosshair;
}

.annotation-wrapper.annotate-mode .upper-canvas {
  cursor: crosshair !important;
}

/* Subtle overlay when in annotate mode */
body.annotate-active::after {
  content: '';
  position: fixed;
  top: 40px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(253, 118, 26, 0.03);
  pointer-events: none;
  z-index: 9997;
}

/* --- Floating Annotation Toolbar --- */
.annotation-toolbar {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1e293b;
  border-radius: 16px;
  padding: 12px;
  display: none;
  flex-direction: column;
  gap: 8px;
  z-index: 100001;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  min-width: 270px;
  user-select: none;
}

.annotation-toolbar.visible {
  display: flex;
}

.annotation-toolbar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  cursor: move;
}

.annotation-toolbar__header span {
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.annotation-toolbar__close {
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  font-size: 16px;
  padding: 2px 6px;
  border-radius: 4px;
}

.annotation-toolbar__close:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

/* Tool buttons row */
.annotation-toolbar__tools {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
}

.annotation-toolbar__tool {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  padding: 0;
}

.annotation-toolbar__tool .material-symbols-outlined {
  font-family: 'Material Symbols Outlined' !important;
  font-size: 20px;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  -webkit-font-smoothing: antialiased;
}

.annotation-toolbar__tool:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.annotation-toolbar__tool.active {
  background: #fd761a;
  color: #fff;
  border-color: #fd761a;
}


/* Color presets */
.annotation-toolbar__colors {
  display: flex;
  gap: 6px;
  padding: 4px 0;
  align-items: center;
}

.annotation-toolbar__color {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
}

.annotation-toolbar__color:hover {
  transform: scale(1.15);
}

.annotation-toolbar__color.active {
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.3);
}

.annotation-toolbar__color-custom {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px dashed #64748b;
  cursor: pointer;
  overflow: hidden;
  position: relative;
}

.annotation-toolbar__color-custom input {
  position: absolute;
  top: -4px;
  left: -4px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  opacity: 0;
}

/* Brush size */
.annotation-toolbar__size {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}

.annotation-toolbar__size label {
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
}

.annotation-toolbar__size input[type="range"] {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  background: #334155;
  border-radius: 2px;
  outline: none;
}

.annotation-toolbar__size input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fd761a;
  cursor: pointer;
}

/* Action buttons */
.annotation-toolbar__actions {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.annotation-toolbar__action {
  flex: 1;
  min-width: 44px;
  padding: 6px 8px;
  border-radius: 6px;
  border: none;
  background: rgba(255,255,255,0.06);
  color: #94a3b8;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  text-align: center;
}

.annotation-toolbar__action:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.annotation-toolbar__action.danger:hover {
  background: rgba(186, 26, 26, 0.3);
  color: #fca5a5;
}

/* --- Dashboard (index.html) --- */
.dashboard {
  min-height: 100vh;
  background: #fcf9f8;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  color: #1b1b1c;
}

.dashboard__header {
  background: linear-gradient(135deg, #001429 0%, #112942 100%);
  padding: 40px 32px 32px;
  color: #fff;
}

.dashboard__header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dashboard__logo {
  display: flex;
  align-items: center;
  gap: 16px;
}

.dashboard__logo img {
  height: 32px;
  filter: brightness(0) invert(1);
}

.dashboard__logo h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.dashboard__logo h1 span {
  color: #fd761a;
}

.dashboard__subtitle {
  color: #7a91ae;
  font-size: 14px;
}

.dashboard__actions {
  display: flex;
  gap: 8px;
}

.dashboard__btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  border: none;
}

.dashboard__btn--primary {
  background: #fd761a;
  color: #fff;
}

.dashboard__btn--primary:hover { opacity: 0.9; }

.dashboard__btn--secondary {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
}

.dashboard__btn--secondary:hover { background: rgba(255,255,255,0.15); }

.dashboard__grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.dashboard__card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.dashboard__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.dashboard__card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  object-position: top;
  border-bottom: 1px solid #f0eded;
}

.dashboard__card-body {
  padding: 16px;
}

.dashboard__card-title {
  font-size: 15px;
  font-weight: 700;
  color: #001429;
  margin-bottom: 4px;
}

.dashboard__card-meta {
  font-size: 12px;
  color: #43474d;
}

.dashboard__card-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 8px;
}

.dashboard__card-badge--annotations {
  background: rgba(253, 118, 26, 0.1);
  color: #9d4300;
}

.dashboard__card-badge--no-annotations {
  background: #f6f3f2;
  color: #74777e;
}

/* Instructions section */
.dashboard__instructions {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px 48px;
}

.dashboard__instructions h2 {
  font-size: 20px;
  font-weight: 700;
  color: #001429;
  margin-bottom: 16px;
}

.dashboard__instructions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.dashboard__instruction-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.dashboard__instruction-card h3 {
  font-size: 14px;
  font-weight: 700;
  color: #001429;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard__instruction-card p {
  font-size: 13px;
  color: #43474d;
  line-height: 1.5;
}

.dashboard__instruction-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

/* --- Toast notifications --- */
.review-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1e293b;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  z-index: 100002;
  opacity: 0;
  transition: all 0.3s;
  pointer-events: none;
}

.review-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* --- Keyboard shortcut hint --- */
.review-shortcut-hint {
  position: fixed;
  top: 56px;
  right: 20px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  z-index: 99998;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.review-shortcut-hint.show {
  opacity: 1;
}

/* --- Print / Export --- */
@media print {
  .review-banner,
  .annotation-toolbar,
  .review-toast,
  .review-shortcut-hint {
    display: none !important;
  }
  body.has-review-banner {
    padding-top: 0 !important;
  }
}
