/*
 Theme Name:   Jeep EV (GeneratePress child)
 Description:  Child theme for jeepev.com. Holds the site's own styles. GeneratePress loads this file by itself.
 Author:       Terry Mason
 Template:     generatepress
 Version:      1.0
 License:      For personal use only.
*/

/* ---------------------------------------------------------------
   Every class below that starts with jev- is drawn by the Jeep EV
   plugin (recall and bulletin posts, model pages, Amazon block).
   Add new styles at the bottom of this file.
   --------------------------------------------------------------- */


/* 1. AMAZON BLOCK
   Placed after the Parts table on recall and bulletin posts. The cards
   inside it are wpZon's own (.wpzon-card) and keep wpZon's styling. */

.jev-amazon {
  clear: both;
  margin: 30px 0;
  padding: 18px 20px 5px 20px;
  background: #f6f8fa;
  border: 1px solid #dde3ea;
  border-radius: 8px;
}

.jev-amazon h3 {
  margin: 0 0 12px 0;
  font-size: 1.1em;
}

.jev-amazon .wpzon-card {
  margin-bottom: 12px;
}


/* 2. TABLES INSIDE A POST
   jev-glance is the "At a glance" table near the top of a post.
   tsb-parts is the Parts table the Amazon block sits under. */

.entry-content table.jev-glance,
.entry-content table.tsb-parts {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 25px 0;
  font-size: 0.95em;
}

.entry-content table.jev-glance th,
.entry-content table.jev-glance td,
.entry-content table.tsb-parts th,
.entry-content table.tsb-parts td {
  border: 1px solid #dde3ea;
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
}

.entry-content table.tsb-parts th,
.entry-content table.jev-glance th {
  background: #f0f3f6;
}

.entry-content table.jev-glance th {
  width: 35%;
  white-space: nowrap;
}


/* 3. WARNING BOX
   For recalls where the owner should act before the repair,
   such as "park outside and do not charge". */

.jev-warning {
  margin: 20px 0;
  padding: 14px 18px;
  background: #fdf1ef;
  border-left: 5px solid #c0392b;
  border-radius: 0 6px 6px 0;
}

.jev-warning strong:first-child {
  color: #a93226;
}


/* 4. MODEL PAGE TABLES
   The list of recalls and bulletins on each model's page. */

.jev-table-wrap {
  overflow-x: auto;
  margin: 0 0 25px 0;
}

table.jev-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95em;
  margin: 0;
}

table.jev-table th,
table.jev-table td {
  border-bottom: 1px solid #e3e7ec;
  padding: 9px 10px;
  text-align: left;
  vertical-align: top;
}

table.jev-table thead th {
  background: #f0f3f6;
  border-bottom: 2px solid #cfd6de;
}

table.jev-table tbody tr:hover {
  background: #f8fafc;
}

.jev-nowrap {
  white-space: nowrap;
}

h2.jev-row-title,
h3.jev-row-title {
  margin-top: 35px;
}


/* 5. MODEL TILES
   One tile per Jeep (Wrangler 4xe, Grand Cherokee 4xe, Wagoneer S, Recon). */

.jev-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 0 0 30px 0;
}

a.jev-tile {
  display: block;
  padding: 20px 14px;
  text-align: center;
  text-decoration: none;
  color: #ffffff;
  background: #0b5e8a;
  border-radius: 8px;
  border-left: 5px solid #19a974;
}

a.jev-tile:hover {
  background: #094c70;
  color: #ffffff;
}

.jev-tile-big {
  display: block;
  font-size: 1.25em;
  font-weight: bold;
  line-height: 1.3;
}

.jev-tile-small {
  display: block;
  margin-top: 4px;
  font-size: 0.85em;
  opacity: 0.9;
}


/* 6. LINKS AT THE FOOT OF EACH POST
   Back to the model page or pages the post belongs to. */

.jev-more {
  margin-top: 30px;
  padding-top: 15px;
  border-top: 1px solid #e3e7ec;
}

.jev-more a {
  display: inline-block;
  margin: 8px 8px 0 0;
  padding: 6px 14px;
  border: 1px solid #0b5e8a;
  border-radius: 20px;
  text-decoration: none;
}

.jev-more a:hover {
  background: #0b5e8a;
  color: #ffffff;
}


/* 7. PHONES AND TABLETS */

@media (max-width: 900px) {
  .jev-tiles {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .jev-tiles {
    grid-template-columns: 1fr;
  }

  .entry-content table.jev-glance th {
    width: auto;
    white-space: normal;
  }
}


/* ---------------------------------------------------------------
   NEW STYLES GO BELOW THIS LINE
   --------------------------------------------------------------- */
