/**
 * TextToSite — Modern Override CSS
 * Injected on cloned sites to modernize the look without touching original structure.
 * All rules use !important sparingly — only where needed to override inline styles.
 */

/* === FONTS === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --tts-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --tts-radius: 8px;
  --tts-shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --tts-shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --tts-shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --tts-transition: all 0.2s ease;
}

/* === TYPOGRAPHY === */
body {
  font-family: var(--tts-font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--tts-font);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

p {
  line-height: 1.7;
}

/* === LINKS === */
a {
  transition: var(--tts-transition);
}

a:hover {
  opacity: 0.85;
}

/* === BUTTONS === */
input[type="submit"],
button[type="submit"],
.btn,
.button,
a.button,
.wp-block-button__link {
  font-family: var(--tts-font);
  font-weight: 600;
  border-radius: var(--tts-radius);
  transition: var(--tts-transition);
  cursor: pointer;
  letter-spacing: 0.01em;
}

input[type="submit"]:hover,
button[type="submit"]:hover,
.btn:hover,
.button:hover,
a.button:hover,
.wp-block-button__link:hover {
  transform: translateY(-1px);
  box-shadow: var(--tts-shadow-md);
}

/* === FORM INPUTS === */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="password"],
textarea,
select {
  font-family: var(--tts-font);
  border-radius: 6px;
  transition: var(--tts-transition);
  font-size: 15px;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
textarea:focus,
select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* === IMAGES === */
img {
  border-radius: 4px;
}

/* === CARDS & BOXES === */
.box,
.card,
.panel,
.widget,
article,
.entry-content {
  border-radius: var(--tts-radius);
}

/* === NAVIGATION === */
nav ul li a {
  transition: var(--tts-transition);
  position: relative;
}

nav ul li a:hover {
  opacity: 0.8;
}

/* === SMOOTH SCROLLING === */
html {
  scroll-behavior: smooth;
}

/* === TABLES (modernize if present) === */
table {
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--tts-radius);
  overflow: hidden;
}

th {
  font-family: var(--tts-font);
  font-weight: 600;
}

td, th {
  padding: 12px 16px;
}

/* === FOOTER === */
footer {
  font-family: var(--tts-font);
}

/* === MOBILE IMPROVEMENTS === */
@media screen and (max-width: 768px) {
  body {
    font-size: 15px;
  }
  
  h1 { font-size: 28px; line-height: 1.3; }
  h2 { font-size: 24px; line-height: 1.3; }
  h3 { font-size: 20px; line-height: 1.3; }
  
  /* Better tap targets */
  a, button, input[type="submit"] {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Prevent horizontal scroll */
  img, video, iframe, embed, object {
    max-width: 100%;
    height: auto;
  }
}

/* === ACCESSIBILITY === */
:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* === SELECTION COLOR === */
::selection {
  background: rgba(59, 130, 246, 0.2);
}

/* === SUBTLE ANIMATIONS === */
@media (prefers-reduced-motion: no-preference) {
  .box, .card, article {
    transition: box-shadow 0.2s ease, transform 0.2s ease;
  }
  
  .box:hover, .card:hover {
    box-shadow: var(--tts-shadow-md);
  }
}

/* === POWERED BY BADGE === */
.tts-badge {
  position: fixed;
  bottom: 12px;
  right: 12px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-family: var(--tts-font);
  font-size: 11px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 20px;
  text-decoration: none;
  z-index: 9999;
  transition: var(--tts-transition);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.tts-badge:hover {
  background: rgba(0,0,0,0.85);
  color: #fff;
  transform: translateY(-2px);
}
