/**
 * ==========================================================
 * AWAP — Core CSS (global utilities for child theme)
 * Location: assets/css/awap-core.css
 * Loaded by awap_enqueue_style_if_exists('awap-core', ...)
 * ==========================================================
 */

/* --------------------------
 * Reset tweaks
 * ------------------------- */
html, body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; }
button, input, select, textarea {
  font-family: inherit;
  font-size: 100%;
}

/* --------------------------
 * Utility classes
 * ------------------------- */
.awap-hidden { display: none !important; }
.awap-inline { display: inline-block !important; }
.awap-flex { display: flex; }
.awap-flex-center { display: flex; align-items: center; justify-content: center; }
.awap-mt-sm { margin-top: 6px; }
.awap-mt-md { margin-top: 12px; }
.awap-mt-lg { margin-top: 24px; }

/* --------------------------
 * Messages (errors, success, notice)
 * ------------------------- */
.awap-error {
  color: #cc0000;
  font-weight: 600;
  margin: 10px 0;
}
.awap-success {
  color: #0a7a3c;
  font-weight: 600;
  margin: 10px 0;
}
.awap-notice {
  color: #444;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  padding: 10px 14px;
  border-radius: 6px;
  margin: 10px 0;
}

/* Inline error on inputs */
input.awap-bad,
select.awap-bad,
textarea.awap-bad {
  border: 1px solid #cc0000 !important;
  background: #fff8f8;
}
small.awap-inline {
  color: #cc0000;
  display: block;
  margin-top: 4px;
}

/* --------------------------
 * Buttons (align with Woo/GP)
 * ------------------------- */
.awap-btn {
  display: inline-block;
  background: #1d4ed8;
  color: #fff;
  padding: 8px 18px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s;
}
.awap-btn:hover,
.awap-btn:focus {
  background: #2563eb;
  color: #fff;
}

/* Secondary / outline button */
.awap-btn-outline {
  background: transparent;
  border: 2px solid #1d4ed8;
  color: #1d4ed8;
}
.awap-btn-outline:hover,
.awap-btn-outline:focus {
  background: #1d4ed8;
  color: #fff;
}

/* --------------------------
 * Modal (policy, alerts, etc.)
 * ------------------------- */
.awap-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 9998;
  display: none;
}
.awap-modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  width: 95%;
  max-width: 720px;
  max-height: 85vh;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
  z-index: 9999;
  display: none;
}
.awap-modal-header {
  padding: 14px 18px;
  border-bottom: 1px solid #eee;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.awap-modal-body {
  padding: 16px 18px;
  overflow: auto;
  max-height: 55vh;
  border-bottom: 1px solid #eee;
}
.awap-modal-footer {
  padding: 12px 18px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* --------------------------
 * Forms
 * ------------------------- */
.awap-form label {
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}
.awap-form input,
.awap-form select,
.awap-form textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
}
.awap-form input:focus,
.awap-form select:focus,
.awap-form textarea:focus {
  outline: none;
  border-color: #1d4ed8;
  box-shadow: 0 0 0 1px #1d4ed8;
}

/* --------------------------
 * Scheduler & tables
 * ------------------------- */
.awap-scheduler {
  max-width: 760px;
  margin: 0 auto;
}
.awap-scheduler table {
  width: 100%;
  border-collapse: collapse;
}
.awap-scheduler th,
.awap-scheduler td {
  border: 1px solid #e5e7eb;
  padding: 8px;
  text-align: left;
}

/* --------------------------
 * Accessibility helpers
 * ------------------------- */
[role="alert"] {
  outline: none;
}
.awap-sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
