/* ============================================
   UNIFIED COMPONENT SYSTEM
   - 2 Button Types: Primary & Secondary
   - 1 Input Type: Universal Input
   ============================================ */

/* ============= BUTTONS ============= */

.btn {
  /* Base button styles */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  outline: none;
  text-decoration: none;
  white-space: nowrap;
}

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

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

/* Button Sizes */
.btn-sm {
  padding: 6px 12px;
  font-size: 0.875rem;
  gap: 4px;
}

.btn-md {
  padding: 10px 20px;
  font-size: 1rem;
  gap: 6px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1.125rem;
  gap: 8px;
}

/* PRIMARY BUTTON - Green theme (main actions) */
.btn-primary {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.btn-primary:active:not(:disabled) {
  background: #047857;
}

/* SECONDARY BUTTON - Outlined (secondary actions, cancel) */
.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #94A3B8;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: none;
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.btn-secondary:active:not(:disabled) {
  background: rgba(255, 255, 255, 0.15);
}

/* Button icon spacing */
.btn i {
  font-size: 0.9em;
}

/* Full-width button variant */
.btn-full {
  width: 100%;
}

/* Icon-only button variant */
.btn-icon-only {
  padding: 10px;
  gap: 0;
}

.btn-icon-only span {
  display: none;
}

/* Loading state */
.btn .fa-spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ============= INPUTS ============= */

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.input-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #E2E8F0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.input-group .required {
  color: #EF4444;
  font-size: 1rem;
}

.input-container {
  position: relative;
  width: 100%;
}

.input-container.has-icon {
  position: relative;
}

.input-container .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748B;
  font-size: 1rem;
  pointer-events: none;
}

.input-container.has-icon .input {
  padding-left: 44px;
}

/* Universal Input Style */
.input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #FFFFFF;
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  transition: all 0.3s ease;
  outline: none;
}

.input::placeholder {
  color: #64748B;
}

.input:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: #10B981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.input:disabled {
  background: rgba(255, 255, 255, 0.02);
  color: #64748B;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Textarea specific */
textarea.input {
  resize: vertical;
  min-height: 80px;
  font-family: 'Inter', sans-serif;
}

/* Select specific */
select.input {
  cursor: pointer;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  appearance: none;
}

select.input:focus {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2310B981' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Input hint text */
.input-hint {
  font-size: 0.8125rem;
  color: #64748B;
  margin-top: -4px;
  display: block;
}

/* Error state */
.input-group.error .input {
  border-color: #EF4444;
}

.input-group.error .input:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.input-group .error-message {
  color: #EF4444;
  font-size: 0.8125rem;
  margin-top: -4px;
}

/* Success state */
.input-group.success .input {
  border-color: #10B981;
}

/* Input with validation icon */
.input-container.validated::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  background-size: contain;
  background-repeat: no-repeat;
}

.input-group.success .input-container.validated::after {
  background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M15 4.5L6.75 12.75L3 9' stroke='%2310B981' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.input-group.error .input-container.validated::after {
  background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.5 4.5L4.5 13.5M4.5 4.5L13.5 13.5' stroke='%23EF4444' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ============= RESPONSIVE ============= */

@media (max-width: 768px) {
  .btn-lg {
    padding: 12px 24px;
    font-size: 1rem;
  }

  .btn-md {
    padding: 8px 16px;
    font-size: 0.9375rem;
  }

  .btn-sm {
    padding: 6px 10px;
    font-size: 0.8125rem;
  }
}


