/* ============================================
   ArgusHawk Unified CSS
   Consolidated from all template files
   ============================================ */

/* ============================================
   CSS Imports and Variables
   ============================================ */
@import url(https://fonts.googleapis.com/css?family=Roboto:700,400,300);

/* Note: --primary-color is set dynamically via template variable in base.html */
:root {
  --bulma-primary-h: 0deg;
  --bulma-primary-l: 100%;
  --bulma-success-h: 144deg;
  --bulma-success-s: 93%;
  --bulma-warning-h: 26deg;
  --bulma-danger-h: 360deg;
  --bulma-danger-l: 65%;
  /* --primary-color is set in base.html via inline style */
}

/* ============================================
   Base/Global Styles
   ============================================ */
*.has-text-primary {
  color: var(--primary-color) !important;
}

*.is-primary {
  background-color: var(--primary-color) !important;
}

body {
  font-family: Roboto;
}

.navbar-item img {
  max-height: 2rem;
}

.img-outline {
  filter: drop-shadow(0 0 1px white);
}

a {
  color: inherit;
}

/* ============================================
   Component Styles - Cards
   ============================================ */
.card {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s;
}

.card:hover {
  transform: scale(1.03);
}

.card.unread {
  border: 2px solid var(--primary-color);
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 123, 255, 0.3);
}

.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s;
}

.card-link:hover {
  transform: scale(1.03);
}

/* ============================================
   Component Styles - Modals
   ============================================ */
.modal-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
}

/* ============================================
   Component Styles - Ribbons
   ============================================ */
.has-ribbon-top {
  position: relative;
}

.has-ribbon-top .ribbon {
  top: 0.5em;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  -webkit-transform: translateX(-50%);
  border-right: 0.1rem solid #dbdbdb;
}

/* ============================================
   Component Styles - Forms
   ============================================ */
.source-row {
  border-radius: 6px;
  margin-bottom: 1rem;
  padding: 1rem;
}

.new-row {
  background: #e8f5e8;
  border-color: #28a745;
}

/* ============================================
   Component Styles - Profile/Avatar
   ============================================ */
.wrap {
  position: relative;
  display: inline-block;
}

.wrap #upload_pic_icon {
  display: none;
  position: absolute;
  top: 10px;
  right: 10px;
}

.wrap:hover #upload_pic_icon {
  display: block;
}

/* ============================================
   Component Styles - Branding Assets
   ============================================ */
.preview-container {
  border: 1px dashed #dbdbdb;
  padding: 10px;
  text-align: center;
  margin-bottom: 15px;
  position: relative;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url('static//image//transparent_bg.svg');
}

.preview-container:hover {
  background-image: none;
}

.preview-container img {
  max-width: 100%;
  max-height: 100%;
}

.file-name {
  margin-top: 8px;
  font-size: 0.8rem;
  word-break: break-all;
}

.upload-success {
  color: #48c774;
  display: none;
  margin-top: 5px;
}

.recommended-size {
  font-size: 0.75rem;
  color: #7a7a7a;
  margin-top: 5px;
}

.asset-row {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
}

.asset-row:last-child {
  border-bottom: none;
}

.asset-description {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 1rem;
  font-style: italic;
}

.buttons-container {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

/* ============================================
   Page-Specific Styles - Home/Dashboard
   Scoped to .dashboard-page class to only affect home page
   ============================================ */
body.dashboard-page {
  overflow: hidden;
}

.dashboard-page .fullwidth-override {
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  width: 100vw;
}

.dashboard-page .hero-body .container {
  max-width: none !important;
  width: 100% !important;
  padding: 0 !important;
}

.dashboard-page .dashboard-columns {
  margin: 0 !important;
  height: calc(100vh - 52px);
}

.dashboard-page .scrollable-column {
  height: 99%;
  overflow-y: auto;
  padding: 1rem;
}

.dashboard-page .hero {
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.dashboard-page .side-column-box {
  height: 99%;
  margin: 0;
  border-radius: 0;
  padding: 0 !important;
}

/* Update notification styles */
.dashboard-page .update-notification {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 0.8rem;
  z-index: 100;
  animation: fadeOut 2s forwards;
  animation-delay: 1s;
}

.dashboard-page .last-updated {
  font-size: 0.7rem;
  color: #666;
  padding: 2px 5px;
  border-radius: 3px;
  transition: all 1.3s ease;
}

.dashboard-page .site-footer {
  height: 0rem;
  visibility: hidden !important;
}

.dashboard-page .asset_message {
  border: 2px solid grey;
  border-radius: 8px;
  box-shadow: none;
  min-width: 0;
  width: 100%;
  overflow: hidden;
}

.dashboard-page .asset_message.new {
  border: 2px solid hsl(var(--bulma-primary-h), 100%, var(--bulma-primary-l));
  border-radius: 8px;
  box-shadow: 0 0 10px hsla(var(--bulma-primary-h), 100%, var(--bulma-primary-l), 0.3);
}

.dashboard-page .message-list {
  min-width: 0;
  width: 100%;
}

.dashboard-page .asset_message > div:first-child {
  min-width: 0;
}

.dashboard-page .asset_message span {
  min-width: 0;
}

/* ============================================
   Page-Specific Styles - Projects
   ============================================ */
.one {
  opacity: 0;
  -webkit-animation: dot 1.3s infinite;
  -webkit-animation-delay: 0.0s;
  animation: dot 1.3s infinite;
  animation-delay: 0.0s;
}

.two {
  opacity: 0;
  -webkit-animation: dot 1.3s infinite;
  -webkit-animation-delay: 0.2s;
  animation: dot 1.3s infinite;
  animation-delay: 0.2s;
}

.three {
  opacity: 0;
  -webkit-animation: dot 1.3s infinite;
  -webkit-animation-delay: 0.3s;
  animation: dot 1.3s infinite;
  animation-delay: 0.3s;
}

.columns.is-multiline {
  display: flex;
  flex-wrap: wrap;
}

.column.is-4 {
  width: 33.333%;
  padding: 10px;
}

.top-right-time {
  position: absolute;
  top: 40px;
  right: 10px;
  font-size: 1rem;
  font-weight: bold;
  color: #333;
}

/* ============================================
   Page-Specific Styles - Checkins
   ============================================ */
#blink_text {
  animation-name: blink;
  animation-duration: 2s;
  animation-timing-function: ease-in;
  animation-iteration-count: Infinite;
}

#blink_text_faster {
  animation-name: blink;
  animation-duration: 1s;
  animation-timing-function: ease-in;
  animation-iteration-count: Infinite;
}

/* ============================================
   Page-Specific Styles - Tracking Table
   ============================================ */
.is-flashing {
  animation: flash-text 1s infinite;
}

/* ============================================
   Animations and Keyframes
   ============================================ */
@keyframes ring {
  0% { transform: rotate(0deg); }
  15% { transform: rotate(10deg); }
  20% { transform: rotate(-10deg); }
  25% { transform: rotate(10deg); }
  30% { transform: rotate(-10deg); }
  35% { transform: rotate(0deg); }
  100% { transform: rotate(0deg); }
}

.ringing {
  animation: ring 3.0s ease-in-out infinite;
  transform-origin: middle center;
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@-webkit-keyframes dot {
  0% { opacity: 0; }
  50% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes dot {
  0% { opacity: 0; }
  50% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes blink {
  0% { color: black; }
  25% { color: white; }
  75% { color: white; }
  100% { color: black; }
}

@keyframes flash-text {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ============================================
   Media Queries
   ============================================ */
/* Ensure message column maintains minimum width before mobile */
@media screen and (min-width: 769px) {
  .dashboard-page .column.is-2:last-child {
    min-width: 200px;
  }
}

/* Mobile override - remove overflow:hidden and allow scrolling */
@media screen and (max-width: 768px) {
  body.dashboard-page {
    overflow: auto !important;
    overflow-x: hidden !important;
  }
  
  .dashboard-page .hero {
    overflow: visible !important;
    height: auto !important;
    min-height: 100vh;
  }
  
  .dashboard-page .dashboard-columns {
    height: auto !important;
    min-height: calc(100vh - 52px);
  }
  
  .dashboard-page .scrollable-column {
    height: auto !important;
    max-height: none !important;
    overflow-y: visible !important;
  }
  
  .dashboard-page .side-column-box {
    height: auto !important;
  }
  
  .dashboard-page .leaflet-view-styles {
    height: 400px !important;
    min-height: 400px !important;
  }
}

@media screen and (max-width: 1024px) {
  .column.is-4 {
    width: 50%;
  }
}

@media screen and (max-width: 768px) {
  .column.is-4 {
    width: 100%;
  }
}

