/* Digital Signature Generator - All Related Styles */

.signature-tools {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.signature-controls-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  align-items: end;
  width: 100%;
}

/* Stroke Width Control Styles */
.stroke-width-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.stroke-width-wrapper > label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.stroke-width-control {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 8px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s ease;
}

.stroke-width-control:hover {
  border-color: var(--primary);
}

.stroke-width-preview {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4px;
  background: var(--bg);
  border-radius: 4px;
  min-height: 30px;
}

#strokePreview {
  display: block;
  max-width: 100%;
  height: auto;
}

.stroke-width-slider {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.stroke-width-slider input[type="range"] {
  width: 100%;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--border);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.stroke-width-slider input[type="range"]:hover {
  background: var(--muted);
}

.stroke-width-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.stroke-width-slider input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.stroke-width-slider input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease;
}

.stroke-width-slider input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.1);
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 400;
}

.stroke-width-value {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4px 8px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-weight: 500;
  font-size: 0.8rem;
  font-family: 'Courier New', monospace;
  letter-spacing: 0.5px;
  transition: border-color 0.2s ease;
}

.stroke-width-value:hover {
  border-color: var(--primary);
}

#penSizeValue {
  text-align: center;
  width: 100%;
}

/* Advanced Color Picker Styles */
.color-picker-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.color-picker-wrapper > label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.color-picker {
  position: relative;
  width: 100%;
  padding: 8px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70px;
}

.color-picker:hover {
  border-color: var(--primary);
}

.color-picker-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  background: transparent;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s ease;
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--text);
  flex: 1;
}

.color-picker-button:hover {
  background: rgba(15, 98, 254, 0.03);
}

.color-preview {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid var(--border);
  flex-shrink: 0;
  transition: border-color 0.2s ease;
}

.color-picker-button:hover .color-preview {
  border-color: var(--primary);
}

.color-value {
  flex: 1;
  text-align: left;
  font-family: 'Courier New', monospace;
  font-weight: 500;
  letter-spacing: 0.5px;
  font-size: 0.8rem;
}

.color-input-hidden {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.color-picker-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: -12px;
  right: -12px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  padding: 16px;
  z-index: 1000;
  display: none;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.color-picker-dropdown.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
  animation: fadeInDown 0.2s ease;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.color-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.color-preset {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 4px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
  position: relative;
}

.color-preset:hover {
  transform: scale(1.05);
  border-color: var(--primary);
  z-index: 1;
}

.color-picker-custom {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.color-picker-custom label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text);
}

.color-picker-custom input[type="text"] {
  flex: 1;
  padding: 6px 10px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  color: var(--text);
  transition: border-color 0.2s ease;
}

.color-picker-custom input[type="text"]:focus {
  outline: none;
  border-color: var(--primary);
}

.color-picker-custom-btn {
  padding: 8px 12px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
  width: 100%;
}

.color-picker-custom-btn:hover {
  background: var(--primary-dark);
}

.color-picker-custom-btn:active {
  opacity: 0.9;
}

/* Signature Actions */
.signature-actions {
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
  margin-top: 12px;
}

.signature-actions .button {
  min-width: 120px;
}

.signature-download {
  margin-left: 0;
}

/* Signature Canvas */
#signaturePad {
  width: 100%;
  border-radius: 14px;
  border: 1px dashed var(--border);
  background: #ffffff;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.02);
  transition: border-color 0.3s ease;
}

/* Responsive Styles */
@media (max-width: 720px) {
  .signature-controls-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .signature-actions {
    justify-content: stretch;
  }
  
  .signature-actions .button {
    flex: 1;
  }
  
  .color-picker-dropdown {
    position: fixed;
    left: 20px;
    right: 20px;
    max-width: calc(100vw - 40px);
  }
  
  .color-presets {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .stroke-width-control {
    padding: 6px;
    min-height: auto;
  }
  
  .stroke-width-preview {
    min-height: 25px;
  }
  
  #strokePreview {
    width: 100%;
    height: auto;
  }
  
  .stroke-width-value {
    padding: 3px 6px;
    font-size: 0.75rem;
  }
  
  .color-picker {
    min-height: auto;
    padding: 6px;
  }
  
  .color-picker-dropdown {
    left: -6px;
    right: -6px;
    padding: 8px;
  }
}

/* Info Section Styles */
.info-section {
  margin-top: 64px;
  padding: 48px 0;
}

.info-section h2 {
  text-align: center;
  margin-bottom: 40px;
  font-size: 32px;
  color: var(--text);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.info-card {
  padding: 32px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.info-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.info-icon {
  font-size: 40px;
  margin-bottom: 16px;
}

.info-card h3 {
  font-size: 20px;
  margin-bottom: 12px;
  color: var(--text);
}

.info-card p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

/* Features Section Styles */
.features-section {
  margin-top: 48px;
  padding: 48px 0;
}

.features-section h2 {
  text-align: center;
  margin-bottom: 32px;
  font-size: 32px;
  color: var(--text);
}

.features-list {
  list-style: none;
  padding: 0;
  max-width: 800px;
  margin: 0 auto;
}

.features-list li {
  padding: 16px 0;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.features-list li:last-child {
  border-bottom: none;
}

.features-list li strong {
  color: var(--accent);
}

@media (max-width: 720px) {
  .info-grid {
    grid-template-columns: 1fr;
  }
  
  .info-section h2,
  .features-section h2 {
    font-size: 24px;
  }
}

