/*
 * File: forms.css
 * Version: mmdb-0.8.18-claude
 * Munich Musicians DB - Forms and Input Styles
 * Form elements, tagboxes, validation, and help elements
 * 0.6.26 CR: admin and content editor rights for all user profiles
 * 0.6.26d FIX: wrong headline when admin editing foreign profile
 * 0.6.35c FIX: admin override style for profiles
 * 0.8.0 NEW: ProValidation
 * 0.8.10a CR: ProValidation button styling
 * 0.8.14c FIX: tooltips on phones
 */

label{display:flex;flex-direction:column;gap:6px}
input,select,textarea{padding:.6rem;border:1px solid #ccc;border-radius:8px}
textarea.formatted{white-space:pre-wrap;font-family:inherit}
.invalid{border-color:#d22;background:#fff6f6}
.help{font-size:.85rem;color:#666}
.help-icon{display:inline-block;width:16px;height:16px;background:#007cba;color:#fff;border-radius:50%;text-align:center;line-height:16px;font-size:12px;margin-left:4px;cursor:help;font-weight:bold}
.help-icon.touch-enabled{cursor:pointer;-webkit-tap-highlight-color:rgba(0,124,186,0.3);tap-highlight-color:rgba(0,124,186,0.3)}
.tooltip-modal-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.5);z-index:10000;display:flex;align-items:center;justify-content:center;animation:fadeIn 0.2s ease}
.tooltip-modal{background:#fff;border-radius:12px;max-width:90%;width:320px;box-shadow:0 8px 32px rgba(0,0,0,0.3);animation:slideUp 0.3s ease}
.tooltip-modal-header{background:#007cba;color:#fff;padding:16px 20px;border-radius:12px 12px 0 0;display:flex;justify-content:space-between;align-items:center}
.tooltip-modal-header h3{margin:0;font-size:16px;font-weight:600}
.tooltip-modal-close{background:rgba(255,255,255,0.2);border:none;color:#fff;width:28px;height:28px;border-radius:50%;font-size:20px;line-height:1;cursor:pointer;transition:background 0.2s;padding:0;display:flex;align-items:center;justify-content:center}
.tooltip-modal-close:hover{background:rgba(255,255,255,0.3)}
.tooltip-modal-body{padding:20px;color:#333;font-size:15px;line-height:1.6}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
@keyframes slideUp{from{transform:translateY(20px);opacity:0}to{transform:translateY(0);opacity:1}}
.tagbox{display:flex;flex-wrap:wrap;gap:6px;border:1px solid #ccc;border-radius:8px;padding:6px;position:relative}
.tagbox input{border:0;flex:1 0 160px;min-width:120px}
.tag{background:#eef;padding:3px 8px;border-radius:6px;display:inline-flex;gap:6px;align-items:center}
.tag.bad{background:#ffe0e0;border:2px solid #ff4444;color:#cc0000;font-weight:600;box-shadow:0 2px 4px rgba(255,68,68,0.3)}
.tag .x{cursor:pointer;font-weight:bold}
.suggest{position:absolute;left:6px;right:6px;top:100%;background:#fff;border:1px solid #ddd;border-radius:8px;box-shadow:0 10px 24px rgba(0,0,0,.08);max-height:180px;overflow:auto;z-index:10}
.suggest button{display:block;width:100%;text-align:left;padding:.45rem .6rem;border:0;background:#fff;cursor:pointer}
.suggest button:hover{background:#f6f6f6}
.suggest .new-band-option{background:#e6f3ff;color:#007cba;font-weight:bold}
.suggest .new-band-option:hover{background:#cce7ff}
.suggest .alias-match {
  background: #e6f7ff;
  color: #0066cc;
  font-weight: 500;
}
.suggest .alias-match:hover {
  background: #cceeff;
}
/* Terms and Email Opt-ins Styling */
/* ***** LEGACY SECTION *******
.terms-and-optins {
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #007cba;
}

.terms-section {
  margin-bottom: 1.5rem;
}

.email-optins-section h4 {
  margin: 0 0 1rem 0;
  color: #2c3e50;
  font-size: 1.1rem;
}

.checkbox-text {
  line-height: 1.4;
}

.checkbox-text a {
  color: #007cba;
  text-decoration: underline;
}

.checkbox-text a:hover {
  color: #005a87;
}

.email-optins-note {
  margin-top: 1rem;
  padding: 0.75rem;
  background: #fff;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #555;
}

.email-optins-note strong {
  color: #2c3e50;
}

.email-optins-note small {
  color: #777;
  font-size: 0.85rem;
}

*/

/* Terms and Email Opt-ins Styling - Size and Positioning Only */
.terms-and-optins {
  font-size: 0.9rem;
  line-height: 1.4;
}

.email-optins-section h4 {
  font-size: 1rem;
}

.checkbox-text {
  font-size: 0.9rem;
}

.email-optins-note {
  font-size: 0.85rem;
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  color: #856404;
}

.email-optins-note strong {
  color: #d63384;
  font-weight: 600;
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

/* Pro Validation Section */
.pro-validation-section {
  margin: 2rem 0;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #ffc107;
}

.pro-validation-section h3 {
  margin: 0 0 1rem 0;
  color: #2c3e50;
  border-bottom: 2px solid #ffc107;
  padding-bottom: 0.5rem;
}

.pro-validation-status {
  padding: 1rem;
  border-radius: 6px;
  margin: 1rem 0;
}

.pro-validation-status.approved {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.pro-validation-status.pending {
  background: #fff3cd;
  border: 1px solid #ffeeba;
  color: #856404;
}

.pro-validation-status.rejected {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

.pro-badge {
  display: inline-block;
  background: #28a745;
  color: white;
  padding: 4px 12px;
  border-radius: 4px;
  font-weight: bold;
  margin-right: 10px;
}

.pro-validation-apply {
  margin: 1rem 0;
}

.pro-validation-apply p {
  margin-bottom: 1rem;
  line-height: 1.6;
  color: #555;
}

.pro-validation-apply .button {
  display: inline-block;
  margin-top: 10px;
  font-size: 1.05rem !important;
  padding: 0.85rem 1.75rem !important;
  font-weight: 600 !important;
  min-width: 200px !important;
  text-transform: none !important;
  border-radius: 8px !important;
  transition: all 0.3s ease !important;
}

.pro-validation-apply .button-primary {
  background: linear-gradient(135deg, #007cba 0%, #005a87 100%) !important;
  border: none !important;
  box-shadow: 0 3px 8px rgba(0, 124, 186, 0.3) !important;
  color: #ffffff !important;
}

.pro-validation-apply .button-primary:hover {
  background: linear-gradient(135deg, #005a87 0%, #004666 100%) !important;
  box-shadow: 0 4px 12px rgba(0, 124, 186, 0.4) !important;
  transform: translateY(-1px);
}

.pro-validation-apply .button-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 124, 186, 0.3) !important;
}

/* Pro Validation Section */

/* Profile Language Preference */
.language-preference-section {
  margin: 2rem 0;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 8px;
}

.language-preference-section h3 {
  margin: 0 0 1rem 0;
  color: #2c3e50;
  border-bottom: 2px solid #007cba;
  padding-bottom: 0.5rem;
}

.language-preference-section .form-row {
  margin-bottom: 1rem;
}

.language-preference-section label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #2c3e50;
}

.language-preference-section select {
  width: 100%;
  max-width: 300px;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  background-color: white;
}

.language-preference-note {
  margin-top: 1rem;
  padding: 0.75rem;
  background: #e8f4f8;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #555;
}

/* Profile Email Preferences */
.email-preferences-section {
  margin: 2rem 0;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 8px;
}

.email-preferences-section h3 {
  margin: 0 0 1rem 0;
  color: #2c3e50;
  border-bottom: 2px solid #007cba;
  padding-bottom: 0.5rem;
}

.email-preferences-note {
  margin-top: 1rem;
  padding: 0.75rem;
  background: #e8f4f8;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #555;
}

.form-row {
  margin-bottom: 0.75rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .terms-and-optins,
  .language-preference-section,
  .email-preferences-section {
    padding: 1rem;
    margin: 1rem 0;
  }

  .language-preference-section select {
    max-width: 100%;
  }

  .checkbox-text {
    font-size: 0.9rem;
  }
}

/* Profile Save Button */
.profile-save-section {
  margin: 3rem 0;
  text-align: center;
  padding: 2rem 0;
  border-top: 3px solid #007cba;
  border-bottom: 3px solid #007cba;
  background: #f8f9fa;
}

.profile-save-btn {
  font-size: 1.2rem !important;
  padding: 1rem 2.5rem !important;
  font-weight: bold !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3) !important;
  transition: all 0.3s ease !important;
}

.profile-save-btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(0, 124, 186, 0.4) !important;
}

/* GDPR Section Enhanced Separation */
.gdpr-delete-section {
  margin-top: 4rem !important;
  border-top: 4px solid #d63638 !important;
  position: relative;
}

.gdpr-delete-section::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: #d63638;
}

/* Universal Button Enhancement - Add to existing styles
.button {
  font-weight: bold !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  border-radius: 8px !important;
  transition: all 0.3s ease !important;
}
*/

.button:hover {
  transform: translateY(-1px) !important;
}

/* Enhanced shadows for existing button types */
.button-primary {
  box-shadow: 0 3px 8px rgba(0, 124, 186, 0.3) !important;
}

.button-primary:hover {
  box-shadow: 0 4px 12px rgba(0, 124, 186, 0.4) !important;
}

.button:not(.button-primary) {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
}

.button:not(.button-primary):hover {
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2) !important;
}

/* Band Manager Button */
.band-manager-button-container {
  margin-top: 12px;
  margin-bottom: 20px;
}

#band-manager-btn {
  display: inline-block;
  background: linear-gradient(135deg, #007cba 0%, #005a8b 100%);
  color: #fff !important;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: bold;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid #007cba;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0,124,186,0.3);
  letter-spacing: 0.5px;
}

#band-manager-btn:hover {
  background: linear-gradient(135deg, #005a8b 0%, #004066 100%);
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,124,186,0.4);
  text-decoration: none;
}

#band-manager-btn:focus {
  outline: 2px solid #007cba;
  outline-offset: 2px;
}

/* Responsive adjustments for Band Manager button */
@media (max-width: 768px) {
  #band-manager-btn {
    padding: 8px 16px;
    font-size: 12px;
  }
}

/* Terms checkbox validation styling */
input[type="checkbox"].invalid {
  outline: 2px solid #d63638 !important;
  outline-offset: 2px !important;
}

.checkbox-label {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  cursor: pointer;
  gap: 0.75rem;
}

.checkbox-label input[type="checkbox"] {
  margin: 0;
  flex-shrink: 0;
  order: 1;
}

.checkbox-text {
  order: 2;
  flex: 1;
}
.checkbox-label:has(input[type="checkbox"].invalid) .checkbox-text {
  color: #d63638 !important;
  font-weight: bold !important;
}

/* Registration Save Button */
.registration-save-btn {
  font-size: 1.1rem !important;
  padding: 1rem 2rem !important;
  font-weight: bold !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  min-width: 200px !important;
}

.blacklisted-term {
  padding: .45rem .6rem;
  color: #d22;
  background: #fff6f6;
  border-left: 3px solid #d22;
  font-weight: 500;
}

/* ---------- Admin Override Mode ---------- */
body.admin-override-mode-profile .imm-wrap {
  background: #fff9e6;
  border: 3px solid #ffb900;
  padding: 20px;
  border-radius: 8px;
  position: relative;
}

body.admin-override-mode-profile .imm-wrap::before {
  content: "You are editing another user's profile";
  display: block;
  background: #ffb900;
  color: #000;
  padding: 10px 15px;
  margin: -20px -20px 20px -20px;
  border-radius: 5px 5px 0 0;
  font-weight: bold;
  text-align: center;
}

/* Highlight save button in admin mode */
body.admin-override-mode-profile .profile-save-btn {
  background: #ffb900 !important;
  border-color: #f0a800 !important;
  color: #000 !important;
  font-weight: bold !important;
}

body.admin-override-mode-profile .profile-save-btn:hover {
  background: #f0a800 !important;
  border-color: #e09700 !important;
}

/* Add-Ons Section */
.addons-section {
  margin: 2rem 0;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #28a745;
}

.addons-section h3 {
  margin: 0 0 1.5rem 0;
  color: #2c3e50;
  border-bottom: 2px solid #28a745;
  padding-bottom: 0.5rem;
  font-size: 1.3rem;
}

.addon-item {
  background: #f8f9fa;
  border: none;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.addon-header h4 {
  margin: 0 0 0.75rem 0;
  color: #2c3e50;
  font-size: 1.15rem;
  font-weight: 600;
}

.addon-content-wrapper {
  display: flex;
  align-items: center;
  gap: 2rem;
  justify-content: space-between;
}

.addon-description {
  flex: 1;
}

.addon-description p {
  margin: 0;
  color: #555;
  line-height: 1.6;
  font-size: 0.95rem;
}

.addon-action {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-shrink: 0;
}

.addon-activate-btn {
  background: linear-gradient(135deg, #007cba 0%, #005a87 100%) !important;
  border: none !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  padding: 1rem 2rem !important;
  font-size: 1.1rem !important;
  border-radius: 8px !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 3px 10px rgba(0, 124, 186, 0.3) !important;
  white-space: nowrap;
}

.addon-activate-btn:hover {
  background: linear-gradient(135deg, #005a87 0%, #004666 100%) !important;
  box-shadow: 0 4px 14px rgba(0, 124, 186, 0.4) !important;
  transform: translateY(-1px);
}

.addon-activate-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.addon-deactivate-btn {
  background: #6c757d !important;
  border: none !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  padding: 1rem 2rem !important;
  font-size: 1.1rem !important;
  border-radius: 8px !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 3px 10px rgba(108, 117, 125, 0.3) !important;
  white-space: nowrap;
}

.addon-deactivate-btn:hover {
  background: #5a6268 !important;
  box-shadow: 0 4px 14px rgba(108, 117, 125, 0.4) !important;
  transform: translateY(-1px);
}

.addon-deactivate-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Responsive adjustments for Add-Ons section */
@media (max-width: 768px) {
  .addons-section {
    padding: 1rem;
    margin: 1rem 0;
  }

  .addon-item {
    padding: 1rem;
  }

  .addon-content-wrapper {
    flex-direction: column;
    gap: 1rem;
  }

  .addon-action {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .addon-activate-btn,
  .addon-deactivate-btn {
    width: 100%;
    text-align: center;
  }
}
/* Looking for instruments/skills row with PRO checkbox */
.looking-for-row {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.looking-for-row .tagbox {
  flex: 1;
  min-width: 0;
}

/* Extended layout for instruments + skills tagboxes */
.looking-for-row-extended {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 8px 20px;
  width: 100%;
}

.looking-for-row-extended.pro-hidden {
  grid-template-columns: 1fr;
}

.looking-for-tagboxes {
  display: contents;
}

.tagbox-wrapper {
  display: contents;
}

.tagbox-wrapper .tagbox-label {
  font-size: 0.85rem;
  color: #666;
  font-weight: 500;
  grid-column: 1;
}

.tagbox-wrapper .tagbox {
  grid-column: 1;
  padding: 6px 12px;
}

/* PRO only box for extended layout */
.pro-only-box {
  grid-column: 2;
  grid-row: 2 / 5;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 20px;
  background: #f5f5f5;
  border-radius: 6px;
  cursor: pointer;
}

.pro-only-box:hover {
  background: #ebebeb;
}

.pro-only-box .pro-only-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: #444;
  white-space: nowrap;
}

.pro-only-box input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
  cursor: pointer;
}

.pro-only-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  padding-top: 6px;
  cursor: pointer;
  flex-shrink: 0;
}

.pro-only-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
}

.pro-only-checkbox span {
  font-size: 0.9rem;
  color: #333;
}

@media (max-width: 600px) {
  .looking-for-row-extended {
    grid-template-columns: 1fr;
  }

  .pro-only-box {
    grid-column: 1;
    grid-row: auto;
    margin-top: 8px;
  }
}

@media (max-width: 500px) {
  .looking-for-row {
    flex-wrap: wrap;
  }

  .looking-for-row .tagbox {
    width: 100%;
  }
}

/* Offer As custom dropdown (Booking Manager) */
.offer-as-section {
  margin-top: 20px;
  margin-bottom: 20px;
}
.offer-as-section > label {
  margin-bottom: 8px;
}
.offer-as-dropdown {
  position: relative;
  width: 100%;
}
.offer-as-selected {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s;
}
.offer-as-selected:hover {
  border-color: #007cba;
}
.offer-as-thumb {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}
.offer-as-no-photo {
  width: 40px;
  height: 40px;
  border: 2px dashed #ccc;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #999;
  flex-shrink: 0;
}
.offer-as-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-width: 0;
}
.offer-as-name {
  font-weight: 600;
  font-size: 14px;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.offer-as-stage {
  font-size: 12px;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.offer-as-arrow {
  font-size: 10px;
  color: #666;
  flex-shrink: 0;
}
.offer-as-options {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 100;
  margin-top: 4px;
  max-height: 300px;
  overflow-y: auto;
}
.offer-as-options.open {
  display: block;
}
.offer-as-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background-color 0.15s;
}
.offer-as-option:hover {
  background-color: #f0f6fc;
}
.offer-as-option.selected {
  background-color: #e6f3ff;
}
.offer-as-option:first-child {
  border-radius: 8px 8px 0 0;
}
.offer-as-option:last-child {
  border-radius: 0 0 8px 8px;
}
.offer-as-option:only-child {
  border-radius: 8px;
}
