/*
Theme Name: EasyForm Minimal
Theme URI:  https://example.com/easyform-minimal
Author: Your Name
Author URI: https://example.com
Description: A minimal, full-featured starter theme for WordPress 6.8.3 — clean, accessible and easy to modify.
Version: 1.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: easyform-minimal
Tags: minimal, accessibility, responsive, starter
*/

/* Minimal reset & theme styling */
:root {
  --content-width: 1000px;
  --accent: #1e73be;
}

html,body{height:100%;}
body{
  margin:0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color:#111;
  line-height:1.5;
  background:#fff;
}

a{color:var(--accent); text-decoration:none;}
header.site-header{background:#fff;border-bottom:1px solid #eee; padding:1rem 0;}
.wrap{max-width:var(--content-width);margin:0 auto;padding:0 1rem;}
.site-title{margin:0;font-size:1.25rem;}
.site-description{margin:0;font-size:.9rem;color:#666;}

.site-content{padding:2rem 0;}
.post{margin-bottom:2rem;}
.post-title{font-size:1.5rem;margin:0 0 .5rem;}
.site-footer{border-top:1px solid #eee;padding:1rem 0;color:#666;font-size:.9rem;}
@media (min-width:700px){
  .two-column{display:grid;grid-template-columns:1fr 300px;gap:2rem;}
}

.custom-navbar {
  padding: 10px 20px;
}

.navbar-list {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  align-items: center;
}

.navbar-list li a {
  text-decoration: none;
  color: #333;
  font-weight: 400;
  font-size: 0.95rem;
  padding: 8px 16px;
  transition: all 0.3s ease;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.navbar-list li a:hover {
  color: #667eea;
  background: #f0f0ff;
}

.navbar-list .active a,
.navbar-list li a[aria-current="page"] {
  color: #667eea;
  font-weight: 500;
  background: #f0f0ff;
}

/* Hamburger Menu Button */
.hamburger-menu {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
}

/* Always show hamburger on builder page */
.hamburger-menu.show-on-builder {
  display: flex;
}

.hamburger-menu span {
  display: block;
  width: 28px;
  height: 3px;
  background: #333;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger-menu:hover span {
  background: #667eea;
}

/* Sidebar Menu */
.sidebar-menu {
  position: fixed;
  top: 0;
  left: -300px;
  width: 300px;
  height: 100vh;
  background: linear-gradient(135deg, #e8e8ff 0%, #d8d8ff 30%, #c8c8ff 70%, #b8b8ff 100%);
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  z-index: 1002;
  transition: left 0.3s ease;
  overflow-y: auto;
}

.sidebar-menu.active {
  left: 0;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(102, 126, 234, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 600;
  color: #667eea;
}

.sidebar-title i {
  font-size: 24px;
}

.sidebar-close {
  background: none;
  border: none;
  font-size: 32px;
  cursor: pointer;
  color: #333;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.sidebar-close:hover {
  background: #f0f0ff;
  color: #667eea;
}

.sidebar-navigation {
  padding: 20px 0;
}

.sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-list li {
  margin: 0;
}

.sidebar-list li a {
  display: block;
  padding: 15px 25px;
  color: #333;
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.sidebar-list li a:hover {
  background: #f0f0ff;
  color: #667eea;
  border-left-color: #667eea;
}

.sidebar-list li a.btn-logout,
.sidebar-list li a.btn-login {
  margin: 10px 25px;
  padding: 12px 20px;
  background: #667eea;
  color: #fff;
  border-radius: 6px;
  text-align: center;
  border-left: none;
}

.sidebar-list li a.btn-logout:hover,
.sidebar-list li a.btn-login:hover {
  background: #5568d3;
  color: #fff;
}

/* User Avatar Icon */
.user-avatar-icon {
  display: inline-block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  margin-right: 8px;
  vertical-align: middle;
  position: relative;
}

.user-avatar-icon::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
}

.user-avatar-icon::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 9px;
  border-radius: 50% 50% 0 0;
  background: white;
}

/* Sidebar Overlay */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Responsive - Show hamburger on mobile */
@media (max-width: 768px) {
  .hamburger-menu {
    display: flex;
  }

  .site-navigation {
    display: none;
  }
}

/* Builder Toolbar in Header */
.builder-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  margin-right: 20px;
}

.builder-toolbar-icons {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ezwp-toolbar-icon {
  font-size: 1.2em;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 6px;
  border-radius: 4px;
}

.ezwp-toolbar-icon:hover {
  transform: scale(1.1);
  background: rgba(0, 0, 0, 0.05);
}

.ezwp-toolbar-icon-blue {
  color: #0d6efd;
}

.ezwp-toolbar-icon-blue:hover {
  color: #0a58ca;
}

.ezwp-toolbar-icon-orange {
  color: #ff8c00;
}

.ezwp-toolbar-icon-orange:hover {
  color: #e07b00;
}

.ezwp-toolbar-icon-green {
  color: #28a745;
}

.ezwp-toolbar-icon-green:hover {
  color: #218838;
}

.ezwp-toolbar-icon-green.active {
  opacity: 1 !important;
  background: rgba(40, 167, 69, 0.1);
}

.ezwpform-disabled-icon {
  opacity: 0.4;
  cursor: not-allowed;
}

.ezwpform-disabled-icon:hover {
  transform: none;
  background: none;
}

.toolbar-separator {
  display: inline-block;
  width: 1px;
  height: 24px;
  background: #ccc;
  margin: 0 8px;
}

/* Hide nav menu when builder toolbar is shown */
@media (min-width: 769px) {
  .site-header .builder-toolbar + .site-navigation {
    display: none;
  }
}

/* Responsive toolbar */
@media (max-width: 768px) {
  .builder-toolbar {
    gap: 4px;
    margin-right: 10px;
  }
  
  .builder-toolbar-icons {
    gap: 6px;
  }
  
  .ezwp-toolbar-icon {
    font-size: 1em;
    padding: 4px;
  }
  
  .toolbar-separator {
    margin: 0 4px;
  }
}

/* Show Answers Mode Styles */
.ezwp-answer-badge {
  display: inline-block;
  background: #28a745;
  color: white;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 12px;
  margin-left: 8px;
  font-weight: 500;
}

.ezwp-points-badge {
  display: inline-block;
  background: #0d6efd;
  color: white;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 12px;
  margin-left: 8px;
  font-weight: 500;
}

/* Total points badge */
.ezwp-total-points-badge {
  display: inline-block;
  background: #6610f2;
  color: white;
  font-size: 1rem;
  padding: 6px 12px;
  border-radius: 8px;
  margin-left: 10px;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Highlight correct answer options */
.ezwp-correct-option {
  background-color: #d4edda !important;
  border-left: 4px solid #28a745 !important;
  padding-left: 8px !important;
}

.ezwp-correct-option::after {
  content: ' ✓';
  color: #28a745;
  font-weight: bold;
  margin-left: 8px;
}

/* Highlight incorrect answer options */
.ezwp-incorrect-option {
  background-color: #f8d7da !important;
  border-left: 4px solid #dc3545 !important;
  padding-left: 8px !important;
}

.ezwp-incorrect-option::after {
  content: ' ✗';
  color: #dc3545;
  font-weight: bold;
  margin-left: 8px;
}

/* Status badges for field-level feedback */
.ezwp-answer-status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-left: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.ezwp-badge-green {
  background-color: #28a745;
  color: white;
  opacity: 0.8;
}

.ezwp-badge-amber {
  background-color: #ffc107;
  color: #000;
  opacity: 0.8;
}

.ezwp-badge-red {
  background-color: #dc3545;
  color: white;
  opacity: 0.8;
}

.ezwp-badge-blue {
  background-color: #0d6efd;
  color: white;
  opacity: 0.8;
}

/* Highlight correct answers (blue theme) */
.ezwp-correct-answer-highlight {
  background-color: #cfe2ff !important;
  padding-left: 8px !important;
}

/* Highlight incorrect given answers (red theme) */
.ezwp-incorrect-answer-highlight {
  background-color: #f8d7da !important;
  padding-left: 8px !important;
}

/* Red cross marker for incorrect selections */
.ezwp-incorrect-marker {
  color: #dc3545;
  font-weight: bold;
  margin-left: 8px;
}


/* Answer display for text fields */
.ezwp-answer-tooltip {
  position: relative;
  display: inline-block;
}

.ezwp-answer-tooltip .ezwp-answer-text {
  visibility: hidden;
  background-color: #e7f3ff;
  color: #004085;
  text-align: left;
  border-radius: 6px;
  padding: 8px;
  position: absolute;
  z-index: 1000;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 200px;
  max-width: 400px;
  border: 1px solid #0066cc;
  font-size: 0.875rem;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.ezwp-answer-tooltip:hover .ezwp-answer-text {
  visibility: visible;
}

.ezwp-answer-tooltip .ezwp-answer-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #0066cc transparent transparent transparent;
}
