/* Converter Consistent Styling */
.converter-section {
  margin: 30px 0;
}

.converter-section h2 {
  margin-bottom: 20px;
  font-size: 24px;
  color: #2c3e50;
}

/* Unified button styling - same as UUID generator */
.converter-button, .converter-button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: 2px solid;
  border-radius: 4px;
  font-weight: bold;
  font-size: 16px;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-sizing: border-box;
  min-height: 44px;
  min-width: 162px;
  gap: 8px;
  margin-right: 10px;
  margin-bottom: 10px;
}

/* Primary button style */
.converter-button {
  background-color: #1376B3;
  color: #ffffff;
  border: 2px solid #d1d5db;
}

.converter-button:hover {
  background-color: #005583;
  border-color: #1f2937;
}

/* Secondary button style */
.converter-button-secondary {
  background-color: #ffffff;
  color: #333333;
  border: 2px solid #d1d5db;
}

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

/* Copy icon styling */
.copy-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Button container layouts */
.converter-buttons-container {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
}

.converter-buttons-container-left {
  display: flex;
  gap: 12px;
  align-items: stretch;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

/* Form elements styling */
.converter-form-group {
  margin-bottom: 20px;
}

.converter-form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #374151;
}

.converter-form-select {
  padding: 12px;
  border: 2px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  background-color: #ffffff;
  color: #374151;
  transition: border-color 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

.converter-form-select:focus {
  outline: none;
  border-color: #1376B3;
}

/* Input/Output styling */
.converter-input {
  width: 100%;
  font-family: Consolas, 'Courier New', monospace;
  padding: 16px;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  font-size: 18px;
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 15px;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
  text-align: center;
}

.converter-input:focus {
  outline: none;
  border-color: #1376B3;
}

.converter-output {
  width: 100%;
  font-family: Consolas, 'Courier New', monospace;
  padding: 16px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  background: #f8f9fa;
  font-size: 18px;
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 15px;
  box-sizing: border-box;
  text-align: center;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Conversion selector styling */
.conversion-selector {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 20px;
  margin: 30px 0;
  flex-wrap: wrap;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.selector-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 140px;
  flex: 1;
  max-width: 200px;
}

.selector-group .converter-form-label {
  margin-bottom: 8px;
  text-align: center;
}

.custom-converter-input {
  margin-top: 8px;
  padding: 12px;
  border: 2px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  background-color: #ffffff;
  color: #374151;
  transition: border-color 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

.custom-converter-input:focus {
  outline: none;
  border-color: #1376B3;
}

.swap-button {
  background: #f8f9fa;
  border: 2px solid #d1d5db;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 10px;
  /* Remove default tap highlight and create custom one */
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  outline: none;
  position: relative;
  overflow: hidden;
}

/* Custom tap highlight using pseudo-element */
.swap-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  background: rgba(19, 118, 179, 0.2);
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.swap-button:active::before {
  opacity: 1;
}

.swap-button:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
}

.swap-button.rotated {
  transform: rotate(180deg);
}

.swap-button svg {
  width: 20px;
  height: 20px;
  color: #374151;
}

/* Input and output sections */
.input-section, .output-section {
  margin: 30px 0;
}

.input-group, .output-group {
  max-width: 500px;
  margin: 0 auto;
}

.input-with-copy {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-copy .converter-input {
  /* padding-right: 50px; */
  margin-bottom: 0;
}

.copy-btn {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.copy-btn:hover {
  background-color: #f3f4f6;
}

.copy-btn .copy-icon {
  width: 18px;
  height: 18px;
  color: #6b7280;
}

.copy-btn:hover .copy-icon {
  color: #374151;
}

.output-display {
  width: 100%;
  font-family: Consolas, 'Courier New', monospace;
  padding: 16px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  background: #f8f9fa;
  font-size: 18px;
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 8px;
  box-sizing: border-box;
  text-align: center;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  word-break: break-all;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.output-display:hover {
  border-color: #1376B3;
  background: #f0f8ff;
}

.output-display::after {
  content: "Click to copy";
  position: absolute;
  bottom: 4px;
  right: 8px;
  font-size: 10px;
  color: #9ca3af;
  font-weight: normal;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.output-display:hover::after {
  opacity: 1;
}

.converter-hint {
  font-size: 12px;
  color: #6b7280;
  font-weight: normal;
  text-align: center;
  margin-top: 8px;
}

/* Responsive design */
@media (max-width: 600px) {
  .converter-buttons-container {
    width: 100%;
  }
  
  .converter-buttons-container .converter-button,
  .converter-buttons-container .converter-button-secondary {
    flex: 1;
    min-width: 0;
    margin-right: 0;
  }
  
  .converter-buttons-container .converter-button:not(:last-child),
  .converter-buttons-container .converter-button-secondary:not(:last-child) {
    margin-right: 12px;
  }
}

@media (max-width: 480px) {
  .converter-buttons-container {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  
  .converter-button, .converter-button-secondary {
    width: 100%;
    margin-right: 0;
    margin-bottom: 0;
  }
}

@media (max-width: 450px) {
  .conversion-selector {
    gap: 8px;
    width: 100%;
  }
  
  .selector-group {
    flex: 1;
    min-width: 0;
    max-width: none;
  }
  
  .swap-button {
    margin: 0 4px;
    /* width: 40px;
    height: 40px; */
    flex-shrink: 0;
  }
  
  /* .swap-button svg {
    width: 18px;
    height: 18px;
  } */
}

@media (max-width: 370px) {
  .conversion-selector {
    flex-direction: column;
    gap: 15px;
  }
  
  .selector-group {
    min-width: auto;
    max-width: none;
    width: 100%;
  }
  
  .swap-button {
    margin: 0;
    align-self: center;
    width: 48px;
    height: 48px;
  }
  
  .swap-button svg {
    width: 20px;
    height: 20px;
  }
}