:root {
    --bg-color: #f0f2f5;
    --card-bg: #ffffff;
    --text-color-primary: #1a202c;
    --text-color-secondary: #718096;
    --highlight-color: #1A365D;
    --border-color: #e2e8f0;
    --shadow-light: 0 4px 6px rgba(0, 0, 0, 0.05);
    --icon-bg-light: #f5f6ff;
    --icon-color: #1A365D;
    --gb_file-icon-pdf: #ef4444;
    --file-icon-doc: #4299e1;
    --file-icon-ppt: #ed8936;
    --primary-color: #1A365D;
    --primary-hover: #182F52;
    --gray-100: #f3f4f6;
    --gray-700: #374151;
    --gray-300: #d1d5db;
    --gray-50: #f9fafb;
    --gray-400: #9ca3af;
}

/* Base Styles */
.gb_page-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}
.gb_app-title h1 {
    font-size: 1.5rem;
    margin: 0;
    font-weight: 600;
}
.gb_app-title h2 {
    font-size: 1.25rem;
    margin: 0;
    font-weight: 500;
}
.gb_app-title p {
    font-size: 0.875rem;
    margin: 0;
    color: var(--text-color-secondary);
}
.gb_mt-2 { margin-top: 0.5rem; }
.gb_error {
  color: red;
  font-size: 0.875rem;
  margin-top: 4px;
}

/* --- OPTION CARDS (Main Menu) --- */
.quiz-options {
    margin-top: 30px;
}
.gb_option-card {
    display: flex;
    align-items: center;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}
.gb_option-card:hover {
    box-shadow: var(--shadow-light);
    transform: translateY(-2px);
    border-color: var(--highlight-color);
}
.gb_option-card--disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}
.gb_option-card--disabled:hover {
    box-shadow: none;
    transform: none;
    border-color: var(--border-color);
}
.gb_option-content {
    flex-grow: 1;
}
.gb_option-content h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 5px 0;
}
.gb_option-content p {
    font-size: 0.875rem;
    color: var(--text-color-secondary);
    margin: 0;
}
.gb_option-arrow {
    color: var(--text-color-secondary);
    font-size: 1.5rem;
    flex-shrink: 0;
}
.text-sm {
    font-size: 0.875rem;
    cursor: pointer;
    color: var(--primary-color);
    transition: color 0.2s;
}
.text-sm:hover {
    color: var(--primary-hover);
}

/* --- FORM STYLES --- */
.gb_form-group {
    margin-bottom: 20px;
}
.gb_form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}
.gb_form-group input,
.gb_form-group textarea,
.gb_form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-color-primary);
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.gb_form-group input:focus,
.gb_form-group textarea:focus,
.gb_form-group select:focus {
    outline: none;
    border-color: var(--highlight-color);
}
.gb_conditional-fields {
    border: 1px solid var(--gray-300);
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    background: var(--gray-50);
}
.gb_conditional-fields h3 {
    font-size: 1rem;
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--gray-300);
    margin-bottom: 15px;
}

/* --- IMAGE/DOCUMENT UPLOAD STYLES --- */
.gb_viewfinder {
    position: relative;
    width: 100%;
    height: 150px; /* Reduced height for better fit */
    border: 2px dashed var(--gray-300);
    border-radius: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--gray-50);
    margin-bottom: 1.5rem;
}
.gb_viewfinder-content {
    color: var(--primary-color);
    text-align: center;
}
.gb_image-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}
.gb_image-preview-item {
    width: 100px;
    height: 100px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gb_preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.gb_text-secondary-emphasis {
    color: var(--text-color-secondary);
}
.hidden { display: none; }
.text-center { text-align: center; }

/* --- BUTTONS --- */
.gb_btn-group {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.gb_btn-blue {
    background-color: var(--primary-color) !important;
    color: white !important;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: background-color 300ms;
}
.gb_btn-blue:hover {
    background-color: var(--primary-hover);
}
.gb_btn-gray {
    background-color: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-400) !important; /* Changed from primary-color to a less intense gray border */
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 300ms;
}
.gb_btn-gray:hover {
    background-color: var(--gray-300);
}
.gb_btn-blue:disabled, .gb_btn-gray:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* --- LOADER --- */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.loader {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-300);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error Flashing */
.error-flash {
    border: 1px solid #ef4444 !important; 
    box-shadow: 0 0 5px rgba(255, 77, 79, 0.8);
    transition: border-color 0.1s, box-shadow 0.1s;
}

/* Container for all image previews */
.gb_image-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin: 20px 0;
}

/* Individual image container (critical for positioning the button) */
.gb_image-preview-item {
    position: relative; /* Establish context for absolute positioning */
    width: 150px; /* Example size */
    height: 150px; /* Example size */
    overflow: hidden;
    border: 1px solid #ddd;
    border-radius: 8px;
}

/* Style for the image inside the container */
.gb_image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Style for the removal button */
.gb_remove-image-btn {
    position: absolute;
    top: -5px; /* Adjust as needed */
    right: -5px; /* Adjust as needed */
    background-color: #dc2626 !important; /* Red background */
    color: white !important;
    border: none !important;
    /*border-radius: 50%;*/
    /*width: 24px;*/
    /*height: 24px;*/
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    /*font-size: 14px;*/
    line-height: 1 !important;
    padding: 0 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    z-index: 10 !important;
    background: #fff !important;
    margin: 10px !important;
    width: 20px !important;
    height: 30px !important;
    /*display: flex;*/
    font-size: 10px !important;
    border-radius: 21px !important;
}

/* Overlay (dark background behind popup) */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(2px);
  animation: fadeIn 0.3s ease-in-out;
}

/* Popup box */
.popup-content {
  background: #ffffff;
  border-radius: 12px;
  padding: 30px 35px;
  width: 100%;
  max-width: 420px;
  position: relative;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  animation: slideUp 0.3s ease-out;
  text-align: center;
}

/* Headings & text */
.popup-content h2 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: #111;
}

.popup-content p {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 20px;
}

/* Login form */
.wp-form-container {
  margin-top: 10px;
}

.wp-login-form .form-group {
  margin-bottom: 15px;
  text-align: left;
}

.wp-login-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 5px;
  color: #333;
}

.wp-login-form input[type="text"],
.wp-login-form input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.wp-login-form input:focus {
  border-color: #1e9e5e;
  outline: none;
}

/* Remember me section */
.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

/* Buttons */
.primary-button {
  width: 100%;
  background: #1e9e5e;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 0;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease-in-out;
}

.primary-button:hover:not(:disabled) {
  background: #177a49;
}

.primary-button:disabled {
  background: #8ccaa5;
  cursor: not-allowed;
}

/* Cancel button */
.secondary-button {
  margin-top: 15px;
  background: transparent;
  color: #333;
  border: 1px solid #ccc;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
}

.secondary-button:hover {
  background: #f5f5f5;
}

/* Success & Error Messages */
.login-message-box {
  margin-bottom: 15px;
  font-size: 0.9rem;
  padding: 8px 12px;
  border-radius: 6px;
  text-align: center;
}

.success-message {
  background-color: #e8f8ee;
  color: #187a43;
  border: 1px solid #bce5cc;
}

.error-message {
  background-color: #fdecea;
  color: #c92a2a;
  border: 1px solid #f5c2c0;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hide popup when Alpine x-cloak is applied */
[x-cloak] {
  display: none !important;
}

/* Outer AI box */
.gb-ai-box {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 24px;
}

/* Icon + Title row */
.gb-ai-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

/* Subtitle */
.gb-ai-sub {
    color: #6b7280;
    margin-bottom: 16px;
}

/* List bullets */
.gb-ai-box ul {
    margin-left: 20px;
    margin-bottom: 16px;
}

/* Photo Requirements title */
.gb-ai-subtitle {
    font-weight: 600;
    margin-bottom: 6px;
}

/* WARNING BOX */
.gb-warning-box {
    margin-top: 24px;
    background: #fff8e6;
    border: 1px solid #fcd34d;
    padding: 16px;
    border-radius: 10px;
}

.gb-warning-title {
    font-weight: 600;
    color: #b45309;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}
