
/* TechFinity Weather - components.css
   Shared UI components: modals, toasts, skeletons.
   Keeping this separate reduces merge conflicts with weather.css.
*/

.tf-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.tf-modal {
  width: min(720px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  overflow: auto;
  background: var(--tf-surface);
  border: 1px solid var(--tf-border);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0,0,0,.30);
}

.tf-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--tf-border);
}

.tf-modal-body {
  padding: 14px 16px 18px;
}

.tf-modal-close {
  background: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--tf-muted);
}

.tf-toast-wrap {
  position: fixed;
  right: 14px;
  bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 99999;
}

.tf-toast {
  width: min(380px, calc(100vw - 28px));
  background: var(--tf-surface);
  border: 1px solid var(--tf-border);
  border-left: 6px solid var(--tf-primary);
  border-radius: 12px;
  padding: 12px 12px;
  box-shadow: 0 12px 36px rgba(0,0,0,.20);
}

.tf-toast-title {
  font-weight: 800;
  margin-bottom: 4px;
}

.tf-toast-msg {
  color: var(--tf-muted);
  line-height: 1.35;
}

.tf-skeleton {
  background: linear-gradient(90deg, rgba(0,0,0,0.06) 25%, rgba(0,0,0,0.02) 37%, rgba(0,0,0,0.06) 63%);
  background-size: 400% 100%;
  animation: tf-skel 1.3s ease infinite;
  border-radius: 10px;
}

@keyframes tf-skel {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

.tf-help h2 { margin-top: 0; }
.tf-help ul { padding-left: 18px; }
.tf-help li { margin: 6px 0; }

/* Print friendly */
@media print {
  body { background: #fff !important; }
  .tf-modal-backdrop, .tf-toast-wrap { display:none !important; }
  iframe { display:none !important; }
  .tf-card { break-inside: avoid; }
}


/* Keyboard shortcut hint */
.tf-kbd {
  display:inline-block;
  padding:2px 6px;
  border:1px solid var(--tf-border);
  border-bottom-width:2px;
  border-radius:6px;
  background: var(--tf-surface);
  font-size: 12px;
  color: var(--tf-text);
}

/* Table (for future expansions like historical data) */
.tf-table {
  width:100%;
  border-collapse: collapse;
  font-size: 14px;
}
.tf-table th, .tf-table td {
  padding: 10px;
  border: 1px solid var(--tf-border);
}
.tf-table th {
  text-align:left;
  background: var(--tf-surface-2);
}

/* Print view */
@media print {
  body { background:#fff; }
  header, footer, .tf-locbar, .tf-radar, .notepad { display:none !important; }
  .tf-card { break-inside: avoid; }
}

/* Additional skeleton variations */
.tf-skeleton-line.lg { height: 16px; }
.tf-skeleton-line.sm { height: 10px; }
.tf-skeleton-circle {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(0,0,0,.06), rgba(0,0,0,.12), rgba(0,0,0,.06));
  background-size: 200% 100%;
  animation: tf-sheen 1.2s ease-in-out infinite;
}
@keyframes tf-sheen {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Long-form help text styling */
.tf-help h2 { margin-top: 0; }
.tf-help h3 { margin-bottom: 6px; }
.tf-help ul { margin-top: 6px; }
.tf-help li { margin: 6px 0; }

