/*
Theme Name: YPS Site Services
Theme URI: https://yps.services/
Author: YPS Site Services Team
Author URI: https://yps.services/
Description: Custom WordPress theme for YPS Site Services. Provides branded styling, centered content, and modern card layouts for invoices, contact, and service pages.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: yps-site-services
*/

/* Base styles */
body {
  margin: 0;
  padding: 0;
  font-family: sans-serif;
  background: #fff;
  color: #222;
}

header.site-header, footer.site-footer {
  background: #2d2d2d;
  color: white;
  text-align: center;
  padding: 2rem 1rem;
}

h1, h2, h3 {
  font-weight: 600;
  margin-bottom: 0.5em;
}

section.services, .contact-box, .compliance {
  margin: 2rem 0;
}

main {
  width: 80%;
  margin-top: 75px;
  margin-left: auto;
  margin-right: auto;
  padding: 0rem 0rem;
  box-sizing: border-box;
}

.contact-box {
  border-left: 4px solid #4CAF50;
  background: #f5f5f5;
  padding: 1.5rem 2rem;
  border-radius: 5px;
  margin: 2rem 0;
  box-shadow: 0 2px 12px 0 rgba(0,0,0,0.05);
}

a { color: #007acc; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Invoice Styles */
.yps-invoice-header {
  background: #2d2d2d;
  color: #fff;
  text-align: center;
  padding: 2rem 1rem 1rem 1rem;
  margin-bottom: 2rem;
}

.yps-invoice-meta {
  font-size: 1rem;
  color: #fff;
  margin-top: 0.5rem;
}

.yps-invoice-card {
  width: 80%;
  min-width: 320px;
  margin-left: auto;
  margin-right: auto;
  background: #f5f5f5;
  border-left: 4px solid #4CAF50;
  border-radius: 5px;
  padding: 2rem 2rem 1.5rem 2rem;
  box-shadow: 0 2px 18px 0 rgba(0,0,0,0.08);
  position: relative;
  display: flex;
  flex-direction: column;
  z-index: 2;
  box-sizing: border-box;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.yps-invoice-content {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.yps-row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5em;
  padding-right: 1em;
  border-right: 1.5px dotted #888;
}

.yps-section {
  margin-top: 1em;
}

.yps-total {
  font-size: 1.1em;
  border-top: 1px solid #bbb;
  padding-top: 0.7em;
  margin-top: 0.7em;
}

.yps-label {
  flex: 3;
  text-align: left;
  font-weight: 400;
}

.yps-value {
  flex: 1;
  text-align: right;
  font-weight: 400;
}

.yps-total .yps-label,
.yps-total .yps-value {
  font-weight: bold;
}

.yps-invoice-instructions {
  width: 80%;
  margin: 2rem auto 2rem auto;
  font-size: 1em;
  color: #222;
  line-height: 1.7;
  box-sizing: border-box;
}
.yps-invoice-instructions a {
  color: #4CAF50;
  text-decoration: underline;
}

/* Universal box-sizing for all elements */
*, *:before, *:after {
  box-sizing: border-box;
}

/* Fix for Edge/IE alignment bugs */
@supports (-ms-ime-align: auto) {
  .yps-invoice-card, .contact-box {
    display: block !important;
    width: 80% !important;
    min-width: 320px !important;
  }
}

/* Responsive for mobile */
@media (max-width: 600px) {
  main, .yps-invoice-card, .contact-box, .yps-invoice-instructions {
    width: 98% !important;
    padding: 1rem 0.5rem !important;
  }
}
