/* 
 * WideAccess Admin Panel Styles
 * 
 * This file contains all styles for the WideAccess WordPress plugin admin panel.
 * If styles are not loading, check:
 * 1. File permissions
 * 2. WordPress cache plugins
 * 3. Browser cache
 * 4. CDN cache settings
 */

/* Reset and Base Styles */
* {
  box-sizing: border-box;
}

.wideaccess-admin-wrapper {
  background: #f8fafc;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  margin: -20px -20px 0 -20px;
  padding: 0;
}

/* Header Styles */
.wideaccess-header {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 20px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 32px;
  z-index: 1000;
}

.wideaccess-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wideaccess-logo h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: #1e293b;
}

.wideaccess-header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Button Styles */
.wideaccess-btn {
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.wideaccess-btn-primary {
  background: #0048ff;
  color: white;
}

.wideaccess-btn-primary:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.wideaccess-btn-secondary {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.wideaccess-btn-secondary:hover {
  background: #e2e8f0;
  color: #475569;
}

.wideaccess-btn-green {
  background: #059669;
  color: white !important;
}

.wideaccess-btn-green:hover {
  background: #047857;
  color: white !important;
  transform: translateY(-1px);
}

.wideaccess-btn-dismiss {
  background: #F59E0B;
  color: #fff;
  border: 1px solid #F59E0B;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}

.wideaccess-btn-dismiss:hover {
  background: #D97706;
  border-color: #D97706;
}

/* License Alert */
.wideaccess-license-alert {
  background: #FEF3C7;
  border: 1px solid #F59E0B;
  color: #92400E;
  padding: 12px 16px;
  margin: 12px 30px 0 30px;
  border-left: 4px solid #D97706;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Navigation Tabs */
.wideaccess-nav {
  background: #f8fafc;
  border-bottom: 2px solid #e5e7eb;
  padding: 22px 30px;
  display: flex;
  gap: 8px;
  position: sticky;
  top: 104px; /* 32px admin bar + ~72px header height */
  z-index: 999;
}

.wideaccess-nav .nav-tab {
  padding: 12px 20px;
  text-decoration: none;
  color: #64748b;
  font-weight: 500;
  font-size: 14px;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  background: transparent;
  border: 2px solid transparent;
  position: relative;
}

.wideaccess-nav .nav-tab:hover {
  color: #0048ff;
  background: #ffffff;
  border-color: #e5e7eb;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* PRO License tab is blue-filled by default */
.wideaccess-nav .pro-license-tab {
  background: linear-gradient(135deg, #0048ff, #1d4ed8);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}
.wideaccess-nav .pro-license-tab:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  color: #ffffff;
}

/* When PRO License tab is selected, show outline (not fill) */
.wideaccess-nav .pro-license-tab.nav-tab-active {
  color: #0048ff;
  background: #ffffff;
  border-color: #0048ff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.10);
}

/* Remove special styling for PRO tab to avoid conflicts */

/* Default active tab style (non-PRO): outlined blue, not filled */
.wideaccess-nav .nav-tab-active {
  color: #0048ff;
  background: #ffffff;
  border-color: #0048ff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.10);
}

.wideaccess-nav .nav-tab-active:hover {
  background: #ffffff;
  transform: translateY(-1px);
  color: #0048ff;
}

.tab-icon {
  font-size: 18px;
  line-height: 1;
}

/* Main Content */
.wideaccess-main {
  padding: 30px;
}

.wideaccess-content-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 30px;
  max-width: 1400px;
  margin: 0 auto;
}

.wideaccess-settings-column {
  min-width: 0;
}

.wideaccess-preview-column {
  position: sticky;
  top: calc(104px + 66px - 30px); /* Sticky immediately: nav bottom (170px) - 30px buffer = 140px */
  height: fit-content;
  z-index: 998; /* Below nav (999) but above other content */
}

/* Card Styles */
.wideaccess-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
}

.wideaccess-card h3 {
  margin: 0 0 20px 0;
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
}

/* Add spacing between cards in Modules tab */
#modules-tab .wideaccess-card {
  margin-bottom: 20px;
}

/* Section Styles */
.wideaccess-section {
  margin-bottom: 32px;
}

.wideaccess-section h4 {
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 600;
  color: #374151;
}

.section-description {
  margin: 0 0 16px 0;
  font-size: 14px;
  color: #6b7280;
  line-height: 1.5;
}

.wcag-link {
  color: #0048ff;
  text-decoration: none;
  font-weight: 500;
}

.wcag-link:hover {
  text-decoration: underline;
}

/* Icon Grid */
.icon-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.icon-option {
  position: relative;
  cursor: pointer;
}

.icon-option input[type="radio"] {
  display: none;
}

.icon-preview {
  display: block;
  padding: 8px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  transition: all 0.2s ease;
  background: #ffffff;
}

.icon-preview:hover {
  border-color: #cbd5e1;
}

.icon-option.selected .icon-preview {
  border-color: #0048ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  position: relative;
}

.icon-circle img {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
}

.icon-checkmark {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  background: #0048ff;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.2s ease;
}

.icon-option.selected .icon-checkmark {
  opacity: 1;
  transform: scale(1);
}

/* Size Options */
.size-options-with-slider {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.size-presets {
  display: flex;
  gap: 12px;
}

.size-preset {
  position: relative;
  cursor: pointer;
}

.size-preset input[type="radio"] {
  display: none;
}

.size-preview {
  display: block;
  padding: 12px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  transition: all 0.2s ease;
  background: #ffffff;
}

.size-preset.selected .size-preview {
  border-color: #0048ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Remove fixed sizes since we're using inline styles now */

.size-checkmark {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  background: #0048ff;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.2s ease;
}

.size-preset.selected .size-checkmark {
  opacity: 1;
  transform: scale(1);
}

/* Upload Section */
.upload-section {
  margin-top: 16px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.upload-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.upload-label {
  display: inline-block;
  cursor: pointer;
}

.upload-button {
  display: inline-block;
  padding: 8px 16px;
  background: #0048ff;
  color: white;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s ease;
  border: none;
  cursor: pointer;
}

.upload-button:hover {
  background: #1d4ed8;
}

.delete-icon-button {
  padding: 8px 16px;
  background: #dc2626;
  color: white;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s ease;
  border: none;
  cursor: pointer;
}

.delete-icon-button:hover {
  background: #b91c1c;
}

.upload-info {
  margin-top: 8px;
  color: #6b7280;
}

.upload-icon {
  font-size: 20px;
  opacity: 0.7;
}

/* Custom Size Controls */
.custom-size-controls {
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.custom-size-controls label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #374151;
  font-size: 14px;
}

.size-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.size-slider {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: #e2e8f0;
  outline: none;
  -webkit-appearance: none;
}

.size-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #0048ff;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.size-input {
  width: 60px;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  text-align: center;
}

/* Border Options */
.border-options {
  display: flex;
  gap: 12px;
}

.border-option {
  position: relative;
  cursor: pointer;
}

.border-option input[type="radio"] {
  display: none;
}

.border-preview {
  display: block;
  padding: 12px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  transition: all 0.2s ease;
  background: #ffffff;
}

.border-option.selected .border-preview {
  border-color: #0048ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.with-border {
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 2px #0048ff;
}

.border-checkmark {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  background: #0048ff;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.2s ease;
}

.border-option.selected .border-checkmark {
  opacity: 1;
  transform: scale(1);
}

/* Color Settings Section */
.color-picker-container {
  padding: 20px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

/* Preset Color Swatches */
.preset-colors {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.preset-color {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
  position: relative;
}

.preset-color:hover {
  transform: scale(1.1);
  border-color: #374151;
}

.preset-color.selected {
  border-color: #374151;
  border-width: 3px;
}

.preset-color.selected::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-weight: bold;
  font-size: 12px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}

/* Hex Code Display */
.color-hex-display {
  margin-bottom: 16px;
}

.color-hex {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 12px;
  width: 100px;
  background: #ffffff;
  color: #374151;
}

/* Gradient Color Picker */
.gradient-picker {
  margin-bottom: 16px;
}

.gradient-bar {
  width: 100%;
  height: 32px;
  border-radius: 16px;
  background: linear-gradient(to right, 
    #ef4444, #f97316, #fbbf24, #22c55e, 
    #06b6d4, #3b82f6, #8b5cf6, #ec4899
  );
  position: relative;
  cursor: pointer;
  border: 1px solid #e2e8f0;
}

.color-indicator {
  position: absolute;
  top: 50%;
  width: 20px;
  height: 20px;
  background: white;
  border: 2px solid #374151;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  cursor: grab;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.color-indicator:active {
  cursor: grabbing;
}

.color-reset {
  margin-top: 16px;
  text-align: left;
}

.reset-color-btn {
  padding: 8px 16px !important;
  background: #0048ff !important;
  color: #ffffff !important;
  border: 1px solid #0048ff !important;
  border-radius: 6px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.reset-color-btn:hover {
  background: #1d4ed8 !important;
  border-color: #1d4ed8 !important;
  color: #ffffff !important;
}

/* Language Settings Section */
.language-settings-container {
  padding: 20px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.language-selector {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.language-selector > label {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

/* Auto-detect Option */
.language-option {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  transition: all 0.2s ease;
}

.language-option:hover {
  border-color: #d1d5db;
}

.language-option-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.language-option-content input[type="radio"] {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: #0048ff;
}

.language-option-label {
  flex: 1;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.language-option-title {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
}

.language-option-description {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.4;
}

/* OR Divider */
.language-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 16px 0;
}

.language-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #e5e7eb;
}

.language-divider span {
  background: #f8fafc;
  padding: 4px 16px;
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  position: relative;
  z-index: 1;
}

/* Manual Selection */
.language-manual-selection {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.language-manual-selection label {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}

.language-dropdown {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.language-select {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  color: #374151;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
}

.language-select:hover {
  border-color: #9ca3af;
}

.language-select:focus {
  outline: none;
  border-color: #0048ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.language-select:disabled {
  background-color: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
  opacity: 0.6;
}

.language-info {
  display: flex;
  align-items: center;
}

.language-tag {
  padding: 4px 8px;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
}

.language-description {
  margin-top: 8px;
}

.language-description p {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.4;
  margin: 0;
}

/* Widget Position Section */
.widget-position-container {
  padding: 20px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.widget-position-selector {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.widget-position-selector > label {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}

.widget-position-options {
  display: flex;
  gap: 16px;
}

.widget-position-option {
  flex: 1;
}

.widget-position-option input[type="radio"] {
  display: none;
}

.widget-position-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.widget-position-label:hover {
  border-color: #d1d5db;
  background: #f9fafb;
}

.widget-position-option input[type="radio"]:checked + .widget-position-label {
  border-color: #0048ff;
  background: #eff6ff;
}

.widget-position-icon {
  font-size: 24px;
  color: #6b7280;
  margin-bottom: 8px;
}

.widget-position-option input[type="radio"]:checked + .widget-position-label .widget-position-icon {
  color: #0048ff;
}

.widget-position-text {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
}

.widget-position-option input[type="radio"]:checked + .widget-position-label .widget-position-text {
  color: #0048ff;
}

.widget-position-description {
  margin-top: 8px;
}

.widget-position-description p {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.4;
  margin: 0;
}

/* Device Selector */
.device-selector {
  display: flex;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 20px;
}

.device-tab {
  flex: 1;
  padding: 8px 16px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.device-tab:hover {
  background: #e2e8f0;
  color: #475569;
}

.device-tab.active {
  background: #ffffff;
  color: #0048ff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.device-icon {
  font-size: 16px;
}

/* Position Content */
.position-content {
  display: none;
}

.position-content.active {
  display: block;
}

.position-dropdown {
  margin-bottom: 20px;
}

.position-dropdown label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #374151;
  font-size: 14px;
}

.position-dropdown select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  background: #ffffff;
}

/* Offset Controls */
.offset-controls {
  margin-bottom: 20px;
}

.offset-control {
  margin-bottom: 16px;
}

.offset-control label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #374151;
  font-size: 14px;
}

.slider-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.offset-slider {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: #e2e8f0;
  outline: none;
  -webkit-appearance: none;
}

.offset-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #0048ff;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.offset-input {
  width: 60px;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  text-align: center;
  background: #f9fafb;
}

/* Hide Option */
.hide-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: 0.3s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: #0048ff;
}

input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

.hide-label {
  font-weight: 500;
  color: #374151;
  font-size: 14px;
}

.hide-description {
  margin: 4px 0 0 0;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.4;
}

/* Preview Styles */
.preview-card {
  position: sticky;
  top: 20px;
}

.preview-device-tabs {
  display: flex;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 20px;
}

.preview-device-tab {
  flex: 1;
  padding: 8px 16px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.preview-device-tab:hover {
  background: #e2e8f0;
  color: #475569;
}

.preview-device-tab.active {
  background: #ffffff;
  color: #0048ff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.preview-container {
  position: relative;
  overflow: hidden;
}

.preview-content {
  display: none;
}

.preview-content.active {
  display: block;
}

/* Browser Window Styles */
.browser-window {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.browser-header {
  background: #f8fafc;
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.browser-controls {
  display: flex;
  gap: 6px;
}

.control {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.control.red { background: #ef4444; }
.control.yellow { background: #f59e0b; }
.control.green { background: #10b981; }

.browser-url {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  color: #64748b;
  font-family: monospace;
}

.browser-content {
  position: relative;
  background: #ffffff;
  min-height: 300px;
}

.desktop-preview .browser-content {
  height: 400px;
}

.tablet-preview .browser-content {
  height: 350px;
}

.mobile-preview .browser-content {
  height: 300px;
}

/* Sample Content */
.sample-content {
  padding: 20px;
  display: grid;
  gap: 16px;
}

.desktop-preview .sample-content {
  grid-template-columns: repeat(3, 1fr);
}

.tablet-preview .sample-content {
  grid-template-columns: repeat(2, 1fr);
}

.mobile-preview .sample-content {
  grid-template-columns: 1fr;
}

.content-block {
  background: #f1f5f9;
  border-radius: 8px;
  height: 60px;
}

/* Widget Preview */
.widget-preview {
  position: absolute;
  z-index: 10;
  /* Position will be set dynamically via JavaScript */
}

/* Hide widget on specific devices */
.widget-preview.hidden-on-desktop {
  display: none !important;
}

.widget-preview.hidden-on-tablet {
  display: none !important;
}

.widget-preview.hidden-on-mobile {
  display: none !important;
}

/* Statement Generator Styles - High Specificity for WordPress Admin */
body.wp-admin .statement-generator {
  padding: 0 !important;
  background: #ffffff !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
  overflow: hidden !important;
  margin: 0 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

body.wp-admin .statement-generator-layout {
  display: flex !important;
  min-height: 600px !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.wp-admin .company-info-panel {
  flex: 0 0 400px !important;
  background: #f8fafc !important;
  border-right: 1px solid #e2e8f0 !important;
  padding: 32px !important;
  margin: 0 !important;
}

body.wp-admin .statement-preview-panel {
  flex: 1 !important;
  background: #ffffff !important;
  padding: 32px !important;
  display: flex !important;
  flex-direction: column !important;
  margin: 0 !important;
}

.panel-header h3 {
  margin: 0 0 8px 0;
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
}

.panel-description {
  margin: 0 0 32px 0;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.5;
}

.company-fields {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.field-group {
  display: flex;
  flex-direction: column;
}

.field-group label {
  margin-bottom: 8px;
  font-weight: 500;
  color: #374151;
  font-size: 14px;
}

.company-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background-color: #ffffff;
  font-size: 14px;
  color: #374151;
  transition: all 0.2s ease;
}

.company-input:focus {
  outline: none;
  border-color: #0048ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.statement-preview {
  flex: 1;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.preview-content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.6;
  color: #374151;
}

.preview-content h1,
.preview-content h2,
.preview-content h3,
.preview-content h4,
.preview-content h5,
.preview-content h6 {
  margin-top: 0;
  margin-bottom: 16px;
  font-weight: 600;
  color: #1f2937;
}

.preview-content h2 { font-size: 18px; }
.preview-content h3 { font-size: 16px; }

.preview-content p {
  margin-bottom: 16px;
  line-height: 1.6;
}

.preview-content ul,
.preview-content ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.preview-content li {
  margin-bottom: 8px;
}

/* Old statement-actions style - removed, using new style below */

.btn-secondary {
  padding: 10px 20px;
  background: #ffffff;
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.btn-primary {
  padding: 10px 20px;
  background: #0048ff;
  color: #ffffff;
  border: 1px solid #0048ff;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .statement-generator-layout {
    flex-direction: column;
  }
  
  .company-info-panel {
    flex: none;
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
  }
  
  .statement-preview-panel {
    flex: none;
    min-height: 400px;
  }
}

/* Interactive Position Grid */
.position-selector {
  margin-bottom: 24px;
}

.position-selector label {
  display: block;
  margin-bottom: 12px;
  font-weight: 600;
  color: #374151;
}

/* Position Grid - 8 Position Layout (3x3 with center hidden) */
.position-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  grid-template-rows: repeat(3, 1fr) !important;
  gap: 12px !important;
  background: #f8fafc !important;
  padding: 16px !important;
  border-radius: 8px !important;
  border: 1px solid #e2e8f0 !important;
  margin: 16px auto !important;
}

/* Consistent 3x3 grid for all devices */
.position-content[data-device="desktop"] .position-grid,
.position-content[data-device="tablet"] .position-grid,
.position-content[data-device="mobile"] .position-grid {
  width: 200px !important;
  height: 200px !important;
}

/* Make center position invisible but keep it in layout (5th position) */
.position-option:nth-child(5) {
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Position Grid Styling - Match the image exactly */
.position-grid {
  background: #f8f9fa !important;
  border: 1px solid #6c757d !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
  width: 200px !important;
  height: 200px !important;
  margin: 16px auto !important;
}

.position-option {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.position-option input[type="radio"] {
  display: none !important;
}

.position-option label {
  width: 24px !important;
  height: 24px !important;
  border: 2px solid #6c757d !important;
  border-radius: 50% !important;
  background: transparent !important;
  cursor: pointer !important;
  display: block !important;
  transition: all 0.2s ease !important;
  position: relative !important;
}

.position-option label:hover {
  border-color: #495057 !important;
  background: rgba(108, 117, 125, 0.1) !important;
}

.position-option input[type="radio"]:checked + label {
  background: #6c757d !important;
  border-color: #6c757d !important;
}

.position-option input[type="radio"]:checked + label::after {
  content: "" !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 8px !important;
  height: 8px !important;
  background: #ffffff !important;
  border-radius: 50% !important;
}

/* Size Controls */
.size-reset {
  margin-top: 16px;
  text-align: left;
}

/* Offset Controls */
.offset-reset {
  margin-top: 16px;
  text-align: left;
}

.reset-offsets-btn {
  padding: 8px 16px !important;
  background: #0048ff !important;
  color: #ffffff !important;
  border: 1px solid #0048ff !important;
  border-radius: 6px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.reset-offsets-btn:hover {
  background: #1d4ed8 !important;
  border-color: #1d4ed8 !important;
  color: #ffffff !important;
}

.reset-size-btn {
  padding: 8px 16px !important;
  background: #0048ff !important;
  color: #ffffff !important;
  border: 1px solid #0048ff !important;
  border-radius: 6px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.reset-size-btn:hover {
  background: #1d4ed8 !important;
  border-color: #1d4ed8 !important;
  color: #ffffff !important;
}

.offset-input {
  width: 60px !important;
  padding: 4px 8px !important;
  border: 1px solid #d1d5db !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  text-align: center !important;
}

/* Hide Logo Section */
.hide-logo-control {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.hide-logo-content {
  flex: 1;
  min-width: 0;
}

.hide-logo-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.hide-logo-label {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
}

.hide-logo-description {
  margin: 0;
  font-size: 14px;
  color: #6b7280;
  line-height: 1.5;
}

.hide-logo-toggle {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.hide-logo-toggle .toggle-switch input:disabled + .toggle-slider {
  background-color: #d1d5db;
  cursor: not-allowed;
}

.hide-logo-toggle .toggle-switch input:disabled + .toggle-slider:before {
  background-color: #9ca3af;
}

/* Accessibility Widget Menu */
.accessibility-widget-menu {
  position: absolute;
  bottom: 80px;
  right: 20px;
  width: 320px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  z-index: 1000;
  max-height: 400px;
  overflow-y: auto;
}

.tablet-menu {
  width: 280px;
  bottom: 70px;
}

.mobile-menu {
  width: 260px;
  bottom: 60px;
}

.widget-menu-header {
  background: #0048ff;
  color: white;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.menu-title {
  font-size: 16px;
  font-weight: 600;
}

.menu-close {
  font-size: 20px;
  cursor: pointer;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.menu-close:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.widget-menu-content {
  padding: 20px;
}

.menu-section {
  margin-bottom: 24px;
}

.menu-section:last-child {
  margin-bottom: 0;
}

.menu-section-title {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #0048ff;
  display: inline-block;
}

.menu-options-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 8px !important;
}

/* Ensure 2 columns for all device previews */
.widget-menu .menu-options-grid {
  grid-template-columns: repeat(2, 1fr) !important;
}

.menu-option {
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 12px;
  color: #6b7280;
  text-align: center;
  transition: all 0.2s ease;
}

.menu-option:hover {
  background: #eff6ff;
  border-color: #0048ff;
  color: #0048ff;
}

.widget-menu-footer {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding: 12px 20px;
}

.powered-by {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #6b7280;
}

.wideaccess-icon {
  font-size: 14px;
}

.powered-by-text {
  flex: 1;
}

.learn-more-link {
  color: #0048ff;
  text-decoration: none;
  font-weight: 500;
}

.learn-more-link:hover {
  text-decoration: underline;
}


.widget-icon {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.widget-icon img {
  width: 60%;
  height: 60%;
  filter: brightness(0) invert(1);
}

/* Tab Content */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* Animations */
@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: translateY(10px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

/* Modules Tab Styles */
.wideaccess-modules-container {
  max-width: 1200px;
  margin: 0 auto;
}

.modules-grid {
  display: grid;
  gap: 16px;
}

.module-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}

.module-item:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.module-icon {
  width: 38px;
  height: 38px;
  background: transparent;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #0048ff;
  flex-shrink: 0;
}

.module-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.module-content {
  flex: 1;
  min-width: 0;
}

.module-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.module-header h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
}

/* Premium badge - legacy or other uses */
.premium-badge {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* PRO badge - for paid features in UI */
.pro-badge {
  background: rgb(243, 232, 255);
  color: rgb(126, 34, 206);
  border: 1px solid rgb(233, 213, 255);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.module-description {
  margin: 0;
  font-size: 14px;
  color: #6b7280;
  line-height: 1.5;
}

.module-toggle {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.module-toggle .toggle-switch input:disabled + .toggle-slider {
  background-color: #d1d5db;
  cursor: not-allowed;
}

.module-toggle .toggle-switch input:disabled + .toggle-slider:before {
  background-color: #9ca3af;
}

.module-enabled {
  background: #f0f9ff !important;
  border-color: #0ea5e9 !important;
}

.module-enabled .module-icon {
  background: transparent;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .wideaccess-content-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .wideaccess-preview-column {
    position: static;
  }
}

@media (max-width: 768px) {
  .module-item {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .module-icon {
    align-self: flex-start;
  }
  
  .module-header {
    justify-content: space-between;
  }
  
  .module-toggle {
    align-self: flex-end;
  }
}

@media (max-width: 768px) {
  .wideaccess-header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
  
  .wideaccess-nav {
    flex-wrap: wrap;
    padding: 12px 20px;
    gap: 6px;
  }
  
  .wideaccess-nav .nav-tab {
    padding: 10px 16px;
    font-size: 13px;
  }
  
  .wideaccess-main {
    padding: 20px;
  }
  
  .icon-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .size-options {
    flex-direction: column;
  }
  
  .border-options {
    flex-direction: column;
  }
}

/* Statement Mode Selection Styles */
.statement-mode-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 12px;
}

.mode-option-card {
  position: relative;
  display: flex;
  padding: 20px;
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mode-option-card:hover {
  background: #f3f4f6;
  border-color: #0048ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.mode-option-card.selected {
  background: #eff6ff;
  border-color: #0048ff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.mode-option-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mode-option-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
}

.mode-option-icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}

.mode-option-text {
  flex: 1;
}

.mode-option-text h4 {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
}

.mode-option-text p {
  margin: 0;
  font-size: 14px;
  color: #6b7280;
  line-height: 1.5;
}

.field-description {
  margin: 8px 0 0 0;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .statement-mode-options {
    grid-template-columns: 1fr;
  }
}

/* Statement Editor Styles */
.statement-editor {
  width: 100%;
}

.statement-textarea {
  width: 100%;
  min-height: 500px;
  padding: 16px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  resize: vertical;
  background: #ffffff;
  color: #1e293b;
  box-sizing: border-box;
}

.statement-textarea:focus {
  outline: none;
  border-color: #0048ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.statement-preview-panel .panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.statement-preview-panel .panel-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
}

.statement-preview-panel .statement-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  background: transparent;
  border: none;
  padding: 0;
}

@media (max-width: 768px) {
  .statement-preview-panel .panel-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .statement-preview-panel .statement-actions {
    width: 100%;
    background: transparent;
    border: none;
    padding: 0;
  }
  
  .statement-preview-panel .statement-actions button {
    flex: 1;
  }
}

/* License Management Styles */
.license-info-display {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
}

.license-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #e5e7eb;
}

.license-info-row:last-child {
  border-bottom: none;
}

.license-info-label {
  font-weight: 600;
  color: #1e293b;
  font-size: 14px;
}

.license-info-value {
  color: #64748b;
  font-size: 14px;
}

.license-info-value code {
  background: #ffffff;
  padding: 4px 8px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: #0048ff;
  border: 1px solid #e5e7eb;
}

.license-activation-form {
  max-width: 600px;
}

.license-activation-form input[readonly] {
  background-color: #f9fafb;
  cursor: not-allowed;
  color: #6b7280;
}

@media (max-width: 768px) {
  .license-info-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
