/* styles/components.css */

/* Quick Settings Panel Flyout - Classic Bevel Panel */
.os-quick-settings {
  position: absolute;
  right: 12px;
  bottom: 34px; /* Align above thin taskbar */
  width: 320px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: var(--z-overlay);
  pointer-events: auto;

  background-color: #c0c0c0;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #404040;
  border-bottom: 2px solid #404040;
  box-shadow: 1px 1px 0px #000000;
  border-radius: 0px;

  /* Snappy entrance */
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--duration-medium) var(--ease-fluent), transform var(--duration-medium) var(--ease-fluent);
}

.os-quick-settings--open {
  opacity: 1;
  transform: translateY(0);
}

/* Quick Actions Grid */
.qs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.qs-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 54px;
  background-color: #c0c0c0;
  color: #000000;
  border-top: 1.5px solid #ffffff;
  border-left: 1.5px solid #ffffff;
  border-right: 1.5px solid #404040;
  border-bottom: 1.5px solid #404040;
  border-radius: 0px;
  font-family: var(--font-ui);
  font-weight: bold;
  font-size: 10px;
  cursor: pointer;
  outline: none;
}

.qs-tile:hover {
  background-color: #dfdfdf;
}

.qs-tile:active {
  border-top: 1.5px solid #404040;
  border-left: 1.5px solid #404040;
  border-right: 1.5px solid #ffffff;
  border-bottom: 1.5px solid #ffffff;
  padding-top: 1px;
  padding-left: 1px;
}

/* Active Tile is pressed down */
.qs-tile--active {
  background-color: #dfdfdf !important;
  border-top: 1.5px solid #404040 !important;
  border-left: 1.5px solid #404040 !important;
  border-right: 1.5px solid #ffffff !important;
  border-bottom: 1.5px solid #ffffff !important;
  outline: 1px dotted #000 !important;
  outline-offset: -3px;
  color: #000000 !important;
}

.qs-tile-icon {
  font-size: 14px;
}

/* Quick Settings Sliders */
.qs-sliders {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1.5px dotted #808080;
  padding-top: 10px;
}

.qs-slider-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qs-slider-icon-btn {
  background: transparent;
  border: none;
  color: #000000;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
}

.qs-slider-range {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 6px;
  background: #ffffff;
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  border-right: 1px solid #ffffff;
  border-bottom: 1px solid #ffffff;
  outline: none;
  cursor: pointer;
}

.qs-slider-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 8px;
  height: 16px;
  background: #c0c0c0;
  border-top: 1.5px solid #ffffff;
  border-left: 1.5px solid #ffffff;
  border-right: 1.5px solid #404040;
  border-bottom: 1.5px solid #404040;
  box-shadow: 1px 1px 0 #000;
  cursor: pointer;
}

/* Quick Settings Footer */
.qs-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1.5px dotted #808080;
  padding-top: 8px;
}

.qs-footer-info {
  font-size: 10px;
  font-weight: bold;
  color: #000;
}

.qs-footer-btn {
  width: 50px;
  height: 18px;
  border-top: 1.5px solid #ffffff;
  border-left: 1.5px solid #ffffff;
  border-right: 1.5px solid #404040;
  border-bottom: 1.5px solid #404040;
  background-color: #c0c0c0;
  color: #000000;
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
}

.qs-footer-btn:active {
  border-top: 1.5px solid #404040;
  border-left: 1.5px solid #404040;
  border-right: 1.5px solid #ffffff;
  border-bottom: 1.5px solid #ffffff;
}


/* Start Menu Panel Styling - Windows 95 Rectangular Style */
.os-start-menu {
  position: absolute;
  bottom: 34px; /* Align above taskbar */
  width: 220px !important; /* Thin menu width */
  height: auto !important;
  max-height: 400px !important;
  z-index: var(--z-overlay);
  pointer-events: auto;

  background-color: #c0c0c0;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #404040;
  border-bottom: 2px solid #404040;
  box-shadow: 1px 1px 0px #000000;
  border-radius: 0px;

  display: flex;
  flex-direction: column;
  /* Add left padding to accommodate the vertical stripe */
  padding: 6px 6px 6px 32px !important;
  box-sizing: border-box;
  overflow: hidden;

  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--duration-medium) var(--ease-fluent), transform var(--duration-medium) var(--ease-fluent);
}

/* Vertical Left Sidebar Stripe "DogeOS 95" */
.os-start-menu::before {
  content: "DogeOS 95";
  position: absolute;
  left: 2px;
  top: 2px;
  bottom: 2px;
  width: 22px;
  background: linear-gradient(180deg, #000080 0%, #1084d0 100%);
  color: #ffffff;
  font-family: "Impact", Arial, sans-serif;
  font-size: 14px;
  font-weight: bold;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-align: center;
  padding-top: 8px;
  letter-spacing: 1px;
  box-shadow: inset -1px 0 #dfdfdf;
}

/* Positioning & Alignments */
.os-start-menu--align-center {
  left: 12px !important; /* Left alignment forced for retro feel */
  transform: translateY(10px);
}

.os-start-menu--align-left {
  left: 12px;
  transform: translateY(10px);
}

/* Open states */
.os-start-menu--open.os-start-menu--align-center {
  opacity: 1;
  transform: translateY(0);
}

.os-start-menu--open.os-start-menu--align-left {
  opacity: 1;
  transform: translateY(0);
}

/* Start Menu Search Bar - Retro text input */
.start-search-container {
  position: relative;
  width: 100%;
  margin-bottom: 8px;
}

.start-search-input {
  width: 100%;
  height: 22px;
  padding: 0 4px 0 24px;
  border-radius: 0px !important;
  border-top: 1.5px solid #808080;
  border-left: 1.5px solid #808080;
  border-right: 1.5px solid #ffffff;
  border-bottom: 1.5px solid #ffffff;
  background-color: #ffffff;
  color: #000000;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: bold;
  outline: none;
  box-shadow: inset 1px 1px 0px #000000;
}

.start-search-input:focus {
  border-color: #808080;
}

.start-search-icon {
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: #404040;
}

/* Start Pinned Menu - Re-styled as vertical row list */
.start-section {
  display: flex;
  flex-direction: column;
}

.start-section--pinned {
  flex: 1;
  overflow: hidden;
}

.start-section-header {
  display: flex !important;
  justify-content: flex-end !important;
  margin-bottom: 6px !important;
  padding: 0 4px !important;
}

.start-section-title {
  display: none !important; /* Hide "Pinned" label text */
}

.start-all-apps-btn {
  border-top: 1.5px solid #ffffff !important;
  border-left: 1.5px solid #ffffff !important;
  border-right: 1.5px solid #404040 !important;
  border-bottom: 1.5px solid #404040 !important;
  background-color: #c0c0c0 !important;
  color: #000000 !important;
  font-family: var(--font-ui) !important;
  font-weight: bold !important;
  font-size: 10px !important;
  padding: 2px 6px !important;
  border-radius: 0px !important;
  cursor: pointer !important;
  box-shadow: 1px 1px 0 #000000 !important;
  outline: none !important;
  text-transform: capitalize !important;
}

.start-all-apps-btn:active {
  border-top: 1.5px solid #404040 !important;
  border-left: 1.5px solid #404040 !important;
  border-right: 1.5px solid #ffffff !important;
  border-bottom: 1.5px solid #ffffff !important;
}

/* Convert grid to classic vertical menu list */
.start-pinned-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  overflow-y: auto;
}

.start-pinned-item {
  display: flex !important;
  flex-direction: row !important; /* Row instead of grid cell */
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  height: 26px !important;
  width: 100% !important;
  border: none;
  background: transparent !important;
  color: #000000 !important;
  cursor: pointer;
  border-radius: 0px !important;
  padding: 2px 6px !important;
  text-decoration: none;
}

.start-pinned-item:hover {
  background-color: #000080 !important;
  color: #ffffff !important;
}

.start-pinned-icon {
  font-size: 0 !important;
  color: transparent !important;
  display: inline-block !important;
  width: 16px !important;
  height: 16px !important;
  margin-bottom: 0px !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  image-rendering: pixelated;
}

/* Custom icons for start menu entries */
.start-pinned-item[data-app-id="welcome"] .start-pinned-icon {
  background-image: url('../assets/icons/much_welcome.png') !important;
}
.start-pinned-item[data-app-id="notepad"] .start-pinned-icon {
  background-image: url('../assets/icons/doge_scribbles.png') !important;
}
.start-pinned-item[data-app-id="settings"] .start-pinned-icon {
  background-image: url('../assets/icons/so_settings.png') !important;
}
.start-pinned-item[data-app-id="taskmanager"] .start-pinned-icon {
  background-image: url('../assets/icons/very_performance.png') !important;
}
.start-pinned-item[data-app-id="troll"] .start-pinned-icon {
  background-image: url('../assets/icons/troll_face.png') !important;
}

.start-pinned-label {
  font-size: 11px !important;
  font-weight: bold !important;
  text-align: left !important;
}

.start-pinned-item:hover .start-pinned-label {
  color: #ffffff !important;
}

/* Hide recommended files to match retro menu simplicity */
.start-section--recommended {
  display: none !important;
}

/* Power Footer Panel */
.start-footer {
  height: 32px !important;
  border-top: 1.5px solid #808080;
  margin: 6px -6px -6px -32px !important;
  background-color: #c0c0c0;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 0 6px 0 32px !important;
}

.start-footer-profile {
  display: flex;
  align-items: center;
}

.start-profile-avatar {
  display: none !important; /* Hide avatar circle */
}

.start-profile-name {
  font-size: 11px !important;
  font-weight: bold !important;
  color: #000000 !important;
}

/* Classic rectangular Shut Down button */
.start-power-btn {
  border-top: 1.5px solid #ffffff !important;
  border-left: 1.5px solid #ffffff !important;
  border-right: 1.5px solid #404040 !important;
  border-bottom: 1.5px solid #404040 !important;
  background-color: #c0c0c0;
  color: #000000;
  cursor: pointer;
  width: 68px !important;
  height: 18px !important;
  border-radius: 0px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-family: var(--font-ui) !important;
  font-size: 9px !important;
  font-weight: bold !important;
  padding: 0px !important;
  outline: none;
}

.start-power-btn::before {
  content: "Shut Down";
}

.start-power-btn:active {
  border-top: 1.5px solid #404040 !important;
  border-left: 1.5px solid #404040 !important;
  border-right: 1.5px solid #ffffff !important;
  border-bottom: 1.5px solid #ffffff !important;
}

.start-power-btn svg {
  display: none !important; /* Hide power SVG */
}


/* Custom Context Menu - Retro gray menu flyouts */
.os-context-menu {
  position: absolute;
  min-width: 150px;
  background-color: #c0c0c0;
  border-top: 1.5px solid #ffffff;
  border-left: 1.5px solid #ffffff;
  border-right: 1.5px solid #404040;
  border-bottom: 1.5px solid #404040;
  box-shadow: 1.5px 1.5px 0px #000000;
  border-radius: 0px;
  padding: 2px;
  z-index: var(--z-contextmenu, 4000);
  display: flex;
  flex-direction: column;
  gap: 1px;
  pointer-events: auto;
}

.os-context-menu-item {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  border: none;
  background: transparent;
  color: #000000;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: bold;
  text-align: left;
  padding: 3px 8px;
  border-radius: 0px;
  cursor: pointer;
}

.os-context-menu-item:hover:not([disabled]) {
  background-color: #000080;
  color: #ffffff;
}

.os-context-menu-item[disabled] {
  opacity: 0.45;
  cursor: default;
}

.os-context-menu-item-icon {
  font-size: 11px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 12px;
}

.os-context-menu-item-label {
  flex: 1;
}

.os-context-menu-separator {
  border: none;
  border-top: 1.5px dotted #808080;
  margin: 2px 0;
}
