/* C0MMUN1CATE Shared Styles */

body {
  font-family: "Helvetica Neue", sans-serif;
  padding: 20px;
  color: #333;
  margin: 0;
}

.container {
  max-width: 900px;
  margin: 0 auto;
}

h1 {
  text-align: center;
  margin-bottom: 30px;
  color: #333;
}

/* Form Elements */
.form-row {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

.form-group {
  flex: 1;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #333;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 16px;
  box-sizing: border-box;
  background-color: white;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #ff6b00;
  box-shadow: 0 0 0 2px rgba(255, 107, 0, 0.1);
}

.passcode-input-wrapper {
  position: relative;
}

.passcode-input-wrapper input {
  padding-right: 44px;
}

.passcode-reveal-button {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  padding: 0;
  line-height: 1;
  font-size: 16px;
  cursor: pointer;
  color: #666;
  user-select: none;
}

.passcode-reveal-button:hover {
  color: #ff6b00;
}

.passcode-reveal-button.revealing {
  color: #ff6b00;
}

.label-with-info {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}

.label-with-info label {
  margin-bottom: 0;
}

.passcode-info-button {
  margin: 0 !important;
  margin-left: 0 !important;
  margin-top: 0 !important;
  align-self: center !important;
  width: 18px !important;
  height: 18px !important;
  font-size: 11px !important;
}

.passcode-info-button .info-icon {
  font-size: 11px;
}

/* Custom dropdown arrow for select elements */
.form-group select {
  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='%23666' 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;
}

.form-group select:focus {
  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='%23ff6b00' 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");
}

/* Buttons */
.pay-button {
  width: 100%;
  background-color: #ff6b00;
  color: white;
  font-weight: bold;
  border: none;
  padding: 16px;
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.pay-button:hover {
  background-color: #e85f00;
}

.pay-button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.back-button {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  color: #495057;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.back-button:hover {
  background: #e9ecef;
  border-color: #adb5bd;
}

.option-button {
  background-color: #ff6b00;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s ease;
}

.option-button:hover {
  background-color: #e85f00;
}

/* Cards and Containers */
.option-card {
  flex: 1;
  min-width: 300px;
  background: #fff;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.option-card:hover {
  border-color: #ff6b00;
  box-shadow: 0 4px 12px rgba(255, 107, 0, 0.1);
  transform: translateY(-2px);
}

.option-card h2 {
  color: #333;
  margin-bottom: 15px;
  font-size: 25px;
}

.option-card p {
  color: #666;
  margin-bottom: 25px;
  font-size: 18px;
  line-height: 1.5;
}

.option-card .option-button {
  margin-top: auto;
  align-self: center;
}

.option-card.option-card--dark {
  background: #111;
  border-color: #fff;
}

.option-card.option-card--dark:hover {
  border-color: #ff6b00;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.option-card.option-card--dark h2,
.option-card.option-card--dark p {
  color: #f1f1f1;
}

.plan-card {
  flex: 1;
  min-width: 300px;
  background: #fff;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  padding: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.plan-card:hover {
  border-color: #ff6b00;
  box-shadow: 0 4px 12px rgba(255, 107, 0, 0.1);
}

.plan-card.selected {
  border-color: #ff6b00;
  background: #fff8f5;
  box-shadow: 0 4px 12px rgba(255, 107, 0, 0.2);
}

/* Form Containers */
.payment-section {
  background: #000;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: none;
}

.payment-section.show {
  display: block;
}

.invitation-form-container {
  background: #fff;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin: 0 auto;
}


/* State Headers */
.state-header {
  margin-bottom: 30px;
}

.state-header h1 {
  margin: 15px 0 0 0;
  text-align: center;
  color: #ff6b00;
}

/* Results and Status */
.result {
  margin-top: 20px;
  text-align: center;
  font-size: 16px;
  padding: 15px;
  border-radius: 8px;
}

.loading {
  text-align: center;
  padding: 40px;
  color: #666;
}

.error {
  background: #fee;
  color: #c33;
  border: 1px solid #fcc;
}

.success {
  background: #efe;
  color: #363;
  border: 1px solid #cfc;
}


/* Layout Helpers */
.option-selection {
  display: flex;
  gap: 30px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.plan-selection {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

/* Responsive Design */
@media (max-width: 768px) {
  .plan-selection {
    flex-direction: column;
  }
  
  .form-row {
    flex-direction: column;
  }
  
  .option-selection {
    flex-direction: column;
  }
  
  .state-header h1 {
    text-align: center;
  }
}

/* List Styles - Only for general bullet lists, not plan features or other specific lists */
ul:not(.plan-features):not(.plan-subfeatures) {
  padding-left: 0;
  list-style-type: none;
  line-height: 1.5;
}

ul:not(.plan-features):not(.plan-subfeatures) li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  text-align: justify;
  text-indent: 0;
}

ul:not(.plan-features):not(.plan-subfeatures) li:before {
  content: "• ";
  position: absolute;
  left: 0;
  top: 0;
  color: inherit;
  font-weight: inherit;
}

/* Ordered lists keep default behavior */
ol {
  padding-left: 20px;
  line-height: 1.5;
}

ol li {
  margin-bottom: 8px;
  text-align: justify;
}

/* Utility Classes */
.hidden {
  display: none !important;
}

.show {
  display: block !important;
}

.flex {
  display: flex !important;
}

/* Auto-fill functionality styles */
.auto-filled {
  border-color: #28a745 !important;
  box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2) !important;
  transition: all 0.3s ease;
}

.auto-fill-tooltip {
  position: absolute;
  top: -30px;
  left: 0;
  background: #28a745;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 1000;
  display: none;
}

.auto-fill-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 10px;
  border: 4px solid transparent;
  border-top-color: #28a745;
}

.form-group {
  position: relative;
}

/* Payment Methods Panel */
.payment-methods-panel {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 15px 20px;
  margin: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
}

.payment-methods-text {
  font-size: 14px;
  font-weight: 600;
  color: #495057;
  white-space: nowrap;
}

.payment-methods-logos {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.card-logo {
  height: 24px;
  width: 40px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease;
}

.card-logo:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.card-logo svg {
  width: 100%;
  height: 100%;
  display: block;
}

.card-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
}

.card-logo.highlighted {
  border: 2px solid #ff6b00;
  box-shadow: 0 0 8px rgba(255, 107, 0, 0.4);
  transform: scale(1.05);
  background: #fff8f5;
}

.card-logo.dimmed {
  opacity: 0.4;
  filter: grayscale(50%);
}

/* Responsive adjustments for payment methods panel */
@media (max-width: 768px) {
  .payment-methods-panel {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
  
  .payment-methods-logos {
    justify-content: center;
  }
}

/* Credit Card Validation Styles */
.card-validation-feedback {
  margin-top: 5px;
  font-size: 14px;
  min-height: 20px;
}

.validation-success {
  color: #28a745;
  font-weight: 500;
}

.validation-error {
  color: #dc3545;
  font-weight: 500;
}

.validation-info {
  color: #007bff;
  font-weight: 500;
}

/* Card input states */
.form-group input.card-valid {
  border-color: #28a745 !important;
  box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2) !important;
}

.form-group input.card-invalid {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2) !important;
}

.form-group input.card-incomplete {
  border-color: #007bff !important;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2) !important;
}

/* Credential Display Styles */
.credential-display {
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Courier New', monospace;
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 1px;
  line-height: 1.4;
  word-break: break-all;
  user-select: all;
  -webkit-user-select: all;
  -moz-user-select: all;
  -ms-user-select: all;
}

/* Character type color coding */
.cred-letter {
  color: #000000; /* Black for letters - better readability on blue background */
}

.cred-number {
  color: #3498db; /* Blue for numbers */
}

.cred-symbol {
  color: #e74c3c; /* Red for symbols */
}

/* Credential container styling */
.credential-container {
  background: #f0f8ff;
  padding: 15px;
  border-radius: 5px;
  margin: 10px 0;
  border-left: 4px solid #007bff;
  font-family: Arial, sans-serif;
}

.credential-container strong {
  color: #333;
  font-weight: 600;
}

/* Accessibility and print-friendly styles */
@media print {
  .cred-letter,
  .cred-number,
  .cred-symbol {
    color: #000 !important;
    font-weight: bold;
  }
  
  .cred-letter {
    text-decoration: none;
  }
  
  .cred-number {
    text-decoration: underline;
  }
  
  .cred-symbol {
    text-decoration: overline;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .cred-letter {
    color: #000;
  }
  
  .cred-number {
    color: #0066cc;
  }
  
  .cred-symbol {
    color: #cc0000;
  }
}

/* Responsive credential display */
@media (max-width: 768px) {
  .credential-display {
    font-size: 14px;
    letter-spacing: 0.5px;
  }
}
