/**
 * Modern Admin CSS for TRUENDO WordPress Plugin
 * Theme Color: #4bb3c3
 */

/* WordPress Admin Menu */
#toplevel_page_truendo_wordpress .wp-menu-image img {
  max-width: 18px;
  padding: 8px 0px 0px !important;
}

/* Main wrapper styling */
.wrap.truendo_settings {
  background: #f8f9fa;
  margin: 20px 0 0 0;
  min-height: calc(100vh - 32px);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Header Section */
.truendo_top_holder {
  position: relative;
  background: linear-gradient(135deg, #4bb3c3 0%, #3a9bb0 100%);
  color: white;
  padding: 40px;
  margin: 0 0 0 -20px;
  box-shadow: 0 4px 20px rgba(75, 179, 195, 0.15);
}

.truendo_top_holder h1 {
  color: white !important;
  font-size: 32px;
  font-weight: 300;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.truendo_top_holder p {
    color: black;
}

.truendo_logo {
  max-width: 280px;
  width: 100%;
  height: auto;
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  filter: brightness(0) invert(1);
}

/* Tab Navigation */
.truendo_top_tabs_holder {
  margin: 30px 0 0 0;
  display: flex;
  gap: 2px;
  background: transparent;
}

.truendo_tab_header {
  border: 2px solid rgba(255, 255, 255, 0.3);
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 16px 32px;
  background: rgba(255, 255, 255, 0.1);
  color: #555;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 8px 8px 0 0;
  outline: none !important;
  backdrop-filter: blur(10px);
}

.truendo_tab_header:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #333;
  border-color: rgba(255, 255, 255, 0.5);
}

.truendo_tab_header.active {
  background: white;
  color: #4bb3c3;
  border: 2px solid white;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

/* Main Settings Container */
.truendo_settings_holder {
  width: 100%;
  background: white;
  border-radius: 0 12px 12px 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.truendo_settings_holder section {
  background: white;
  padding: 40px;
}

/* Setting Item Layout */
.truendo_setting_holder {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid #f0f2f5;
}

.truendo_setting_holder:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.truendo_setting_info {
  width: 35%;
  padding-right: 32px;
}

.truendo_setting_info p {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
  line-height: 1.4;
}

.truendo_setting_description {
  font-size: 14px !important;
  color: #6c757d !important;
  font-weight: 400 !important;
  font-style: normal !important;
  margin-top: 8px !important;
  margin-bottom: 8px !important;
  line-height: 1.5;
}

.truendo_setting {
  width: 65%;
  padding-bottom: 0;
}

/* Input Styling */
.truendo_setting input[type="text"],
.truendo_setting select,
.truendo_setting input[type="number"] {
  width: 100%;
  max-width: 400px;
  min-width: 200px;
  padding: 12px 16px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s ease;
  background: white;
}

.truendo_setting input[type="text"]:focus,
.truendo_setting select:focus,
.truendo_setting input[type="number"]:focus {
  border-color: #4bb3c3;
  outline: none;
  box-shadow: 0 0 0 3px rgba(75, 179, 195, 0.1);
}

input[type="checkbox"]:focus,
input[type="color"]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus,
input[type="datetime"]:focus,
input[type="email"]:focus,
input[type="month"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
input[type="radio"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="text"]:focus,
input[type="time"]:focus,
input[type="url"]:focus,
input[type="week"]:focus,
select:focus,
textarea:focus {
  border-color: #4bb3c3;
  box-shadow: 0 0 0 1px #4bb3c3;
  outline: 2px solid transparent;
}

/* Checkbox Styling */
.truendo_setting input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 50px;
  height: 26px;
  background: #ddd;
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
}

.truendo_setting input[type="checkbox"]:checked {
  background: #4bb3c3;
}

.truendo_setting input[type="checkbox"]::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  top: 5px;
  left: 2px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  margin-top: -3px;
}

.truendo_setting input[type="checkbox"]:checked::before {
  transform: translateX(26px);
}

/* Show/Hide Classes */
.truendo_show_when_active {
  display: none;
}

.truendo_show_when_active.active {
  display: block !important;
}

.truendo_show_when_active_extra {
  display: none;
  background: white;
  margin-top: 20px;
  padding: 24px 40px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.truendo_show_when_active_extra.active {
  display: block !important;
}

/* Google Consent Mode Fields */
.truendo_google_consent_fields {
  display: none;
  margin-top: 24px;
  margin-bottom: 24px;
  padding: 32px;
  border: 2px solid #e9ecef;
  background: #f8f9fa;
  border-radius: 12px;
}

.truendo_google_consent_fields.active {
  display: block !important;
}

/* WordPress Consent Fields */
.truendo_wp_consent_fields {
  display: none;
  margin-top: 24px;
  margin-bottom: 24px;
  padding: 32px;
  border: 2px solid #e9ecef;
  background: #f8f9fa;
  border-radius: 12px;
}

.truendo_wp_consent_fields.active {
  display: block !important;
}

/* Consent Categories */
.truendo_consent_categories {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.truendo_consent_category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border: 2px solid #e9ecef;
  background: white;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.truendo_consent_category:hover {
  border-color: #4bb3c3;
  box-shadow: 0 2px 8px rgba(75, 179, 195, 0.1);
}

.truendo_category_label {
  flex: 1;
  font-weight: 600;
  color: #2c3e50;
}

.truendo_category_options {
  display: flex;
  gap: 24px;
}

.truendo_radio_label {
  display: flex !important;
  align-items: center;
  cursor: pointer;
  font-weight: 500 !important;
  color: #495057;
  transition: color 0.2s ease;
}

.truendo_radio_label:hover {
  color: #4bb3c3;
}

.truendo_radio_label input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #dee2e6;
  border-radius: 50%;
  margin-right: 8px;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
}

.truendo_radio_label input[type="radio"]:checked {
  border-color: #4bb3c3;
  background: #4bb3c3;
}

.truendo_radio_label input[type="radio"]:checked::before {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
  top: 0;
  left: 0;
}

/* Unit Label */
.truendo_unit_label {
  color: #6c757d;
  font-size: 14px;
  margin-left: 12px;
  font-weight: 500;
}

/* Submit Button */
.truendo_settings .submit {
  text-align: center;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 2px solid #f0f2f5;
}

.truendo_settings .submit .button {
  background: linear-gradient(135deg, #4bb3c3 0%, #3a9bb0 100%);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 16px 40px;
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(75, 179, 195, 0.3);
}

.truendo_settings .submit .button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(75, 179, 195, 0.4);
}

/* Dashboard Link Button */
.truendo_setting_holder .submit {
  margin: 0;
  padding: 0;
  border: none;
  text-align: left;
}

.truendo_setting_holder .submit .button {
  background: linear-gradient(135deg, #28a745 0%, #20a136 100%);
  padding: 12px 24px;
  margin-top: 20px;
  font-size: 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 3px 10px rgba(40, 167, 69, 0.3);
}

.truendo_setting_holder .submit .button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

/* Form Group Styling */
.truendo_setting .form-group {
  display: flex;
  gap: 12px;
  align-items: stretch;
  margin-bottom: 16px;
}

.truendo_setting .form-group textarea {
  flex: 1;
  min-height: 120px;
  padding: 16px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-family: "Monaco", "Consolas", monospace;
  font-size: 13px;
  line-height: 1.5;
  resize: vertical;
  transition: all 0.3s ease;
}

.truendo_setting .form-group textarea:focus {
  border-color: #4bb3c3;
  outline: none;
  box-shadow: 0 0 0 3px rgba(75, 179, 195, 0.1);
}

.truendo_setting .btn {
  background: linear-gradient(135deg, #4bb3c3 0%, #3a9bb0 100%);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 16px 20px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 80px;
  box-shadow: 0 3px 10px rgba(75, 179, 195, 0.3);
}

.truendo_setting .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(75, 179, 195, 0.4);
}

.truendo_setting .btn:after {
  content: "\f132";
  font-family: "dashicons", sans-serif;
  font-size: 20px;
}

.truendo_todolist .btn:after {
  content: "\f335" !important;
}

/* Todo List */
.truendo_todolist {
  list-style: none;
  padding: 0;
  margin: 16px 0 0 0;
}

.truendo_todolist li {
  background: white;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "Monaco", "Consolas", monospace;
  font-size: 13px;
}

.truendo_todolist li:hover {
  border-color: #4bb3c3;
}

/* Extra Info Section */
.truendo_extra_info {
  text-align: center;
  padding: 20px 0;
}

.truendo_extra_info a {
  color: #4bb3c3;
  text-decoration: none;
  font-weight: 600;
}

.truendo_extra_info a:hover {
  text-decoration: underline;
}

/* Help Tab Styles */
.truendo_help_section {
  padding: 20px 0;
}

.truendo_help_category {
  margin-bottom: 48px;
}

.truendo_help_category h2 {
  font-size: 24px;
  font-weight: 600;
  color: #2c3e50;
  margin: 0 0 24px 0;
  padding-bottom: 12px;
  border-bottom: 3px solid #4bb3c3;
}

.truendo_help_links {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.truendo_help_link {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  background: white;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s ease;
  color: inherit;
}

.truendo_help_link:hover {
  border-color: #4bb3c3;
  box-shadow: 0 4px 16px rgba(75, 179, 195, 0.15);
  transform: translateY(-2px);
}

.truendo_help_link .dashicons {
  font-size: 32px;
  width: 32px;
  height: 32px;
  color: #4bb3c3;
  flex-shrink: 0;
}

.truendo_help_link .dashicons-external {
  font-size: 20px;
  width: 20px;
  height: 20px;
  color: #6c757d;
  margin-left: auto;
}

.truendo_help_link_content {
  flex: 1;
}

.truendo_help_link_content strong {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 4px;
}

.truendo_help_link_content p {
  margin: 0;
  font-size: 14px;
  color: #6c757d;
  line-height: 1.5;
}

.truendo_help_link:hover .truendo_help_link_content strong {
  color: #4bb3c3;
}

.truendo_help_link:hover .dashicons-external {
  color: #4bb3c3;
}

/* Documentation Main Button */
.truendo_help_docs_button {
  text-align: center;
  margin-top: 48px;
  padding-top: 48px;
  border-top: 2px solid #e9ecef;
}

.truendo_docs_main_button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 20px 48px;
  background: linear-gradient(135deg, #4bb3c3 0%, #3a9bb0 100%);
  color: white;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(75, 179, 195, 0.35);
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.truendo_docs_main_button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(75, 179, 195, 0.45);
  color: white;
}

.truendo_docs_main_button .dashicons {
  font-size: 24px;
  width: 24px;
  height: 24px;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .truendo_logo {
    max-width: 200px;
    right: 20px;
  }
}

@media (max-width: 980px) {
  .truendo_top_holder {
    padding: 30px 20px;
    text-align: center;
  }

  .truendo_logo {
    position: static;
    transform: none;
    margin-bottom: 20px;
    max-width: 180px;
  }

  .truendo_setting_holder {
    flex-direction: column;
  }

  .truendo_setting_info,
  .truendo_setting {
    width: 100%;
    padding-right: 0;
  }

  .truendo_setting_info {
    margin-bottom: 16px;
  }

  .truendo_settings_holder section {
    padding: 30px 20px;
  }

  .truendo_consent_category {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .truendo_category_options {
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .truendo_top_holder {
    margin: 0 0 0 -10px;
    padding: 20px;
  }

  .truendo_top_holder h1 {
    font-size: 24px;
  }

  .truendo_tab_header {
    padding: 12px 16px;
    font-size: 12px;
  }

  .truendo_settings_holder section {
    padding: 20px 15px;
  }

  .truendo_setting input[type="text"],
  .truendo_setting select,
  .truendo_setting input[type="number"] {
    min-width: 150px;
  }

  .truendo_setting .form-group {
    flex-direction: column;
  }

  .truendo_consent_category {
    padding: 12px 16px;
  }

  .truendo_category_options {
    gap: 16px;
  }

  .truendo_help_link {
    flex-wrap: wrap;
    padding: 16px 20px;
  }

  .truendo_help_link .dashicons:first-child {
    font-size: 24px;
    width: 24px;
    height: 24px;
  }

  .truendo_help_link_content strong {
    font-size: 15px;
  }

  .truendo_help_link_content p {
    font-size: 13px;
  }

  .truendo_docs_main_button {
    padding: 16px 32px;
    font-size: 16px;
  }
}
