/* Sharpe Design Embroidery Calculator Styles */
/* Brand Colors and Custom Properties */

:root {
  /* Sharpe Design Brand Colors */
  --sharpe-charcoal: #2B2B2B;
  --sharpe-purple: #6B4C93;
  --sharpe-cream: #F5F3F0;
  --sharpe-light-gray: #E8E6E3;
  --sharpe-medium-gray: #8A8A8A;
  --sharpe-white: #FFFFFF;
  
  /* Interactive States */
  --sharpe-purple-hover: #5A3D7A;
  --sharpe-purple-light: #8B6BB1;
  --sharpe-purple-dark: #4A2F5E;
  
  /* Functional Colors */
  --sharpe-success: #28A745;
  --sharpe-warning: #FFC107;
  --sharpe-error: #DC3545;
  --sharpe-info: #17A2B8;
  
  /* Shadows and Effects */
  --sharpe-shadow-light: 0 2px 4px rgba(43, 43, 43, 0.1);
  --sharpe-shadow-medium: 0 4px 8px rgba(43, 43, 43, 0.15);
  --sharpe-shadow-heavy: 0 8px 16px rgba(43, 43, 43, 0.2);
  
  /* Border Radius */
  --sharpe-radius-small: 6px;
  --sharpe-radius-medium: 8px;
  --sharpe-radius-large: 12px;
  
  /* Typography */
  --sharpe-font-primary: 'Montserrat', 'Helvetica Neue', sans-serif;
  --sharpe-font-secondary: 'Open Sans', 'Segoe UI', sans-serif;
  --sharpe-font-accent: 'Dancing Script', 'Pacifico', cursive;
}

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&family=Open+Sans:wght@300;400;500;600&family=Dancing+Script:wght@400;500;600&display=swap');

/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--sharpe-font-secondary);
  background: var(--sharpe-cream);
  color: var(--sharpe-charcoal);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Calculator Wrapper */
.calculator-wrapper {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--sharpe-cream) 0%, #F8F6F3 100%);
  padding: 2rem 1rem;
}

/* Header Styles */
.calculator-header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem 0;
}

.header-content {
  max-width: 600px;
  margin: 0 auto;
}

.main-title {
  font-family: var(--sharpe-font-primary);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--sharpe-charcoal);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.title-icon {
  font-size: 2rem;
  color: var(--sharpe-purple);
}

.subtitle {
  font-size: 1.1rem;
  color: var(--sharpe-medium-gray);
  font-weight: 400;
  margin-bottom: 2rem;
}

/* Logo Integration */
.sharpe-logo {
  max-width: 200px;
  height: auto;
  margin: 0 auto 1.5rem;
  display: block;
  filter: drop-shadow(var(--sharpe-shadow-light));
}

/* Main Content */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
}

.calculator-container {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 2rem;
  align-items: start;
}

/* Calculator Form */
.calculator-form {
  background: var(--sharpe-white);
  border-radius: var(--sharpe-radius-large);
  box-shadow: var(--sharpe-shadow-medium);
  overflow: hidden;
  border: 1px solid var(--sharpe-light-gray);
}

.form-section {
  padding: 2rem;
  border-bottom: 1px solid var(--sharpe-light-gray);
}

.form-section:last-child {
  border-bottom: none;
}

.section-title {
  font-family: var(--sharpe-font-primary);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--sharpe-charcoal);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title i {
  color: var(--sharpe-purple);
  font-size: 1.1rem;
}

/* Input Groups */
.input-group {
  margin-bottom: 1.5rem;
}

.input-group:last-child {
  margin-bottom: 0;
}

.input-label {
  display: block;
  font-weight: 500;
  color: var(--sharpe-charcoal);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.label-icon {
  margin-right: 0.5rem;
  color: var(--sharpe-purple);
}

.input-field {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--sharpe-light-gray);
  border-radius: var(--sharpe-radius-medium);
  font-size: 1rem;
  font-family: var(--sharpe-font-secondary);
  background: var(--sharpe-white);
  color: var(--sharpe-charcoal);
  transition: all 0.3s ease;
}

.input-field:focus {
  outline: none;
  border-color: var(--sharpe-purple);
  box-shadow: 0 0 0 3px rgba(107, 76, 147, 0.1);
  transform: translateY(-1px);
}

.input-field:hover {
  border-color: var(--sharpe-purple-light);
}

.input-help {
  font-size: 0.85rem;
  color: var(--sharpe-medium-gray);
  margin-top: 0.5rem;
}

/* Size Inputs */
.size-inputs {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.size-input-group {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.size-input {
  flex: 1;
  padding: 0.875rem 1rem;
  border: 2px solid var(--sharpe-light-gray);
  border-radius: var(--sharpe-radius-medium);
  font-size: 1rem;
  background: var(--sharpe-white);
  color: var(--sharpe-charcoal);
  transition: all 0.3s ease;
}

.size-input:focus {
  outline: none;
  border-color: var(--sharpe-purple);
  box-shadow: 0 0 0 3px rgba(107, 76, 147, 0.1);
}

.size-unit {
  font-size: 0.9rem;
  color: var(--sharpe-medium-gray);
  font-weight: 500;
}

.size-separator {
  font-size: 1.2rem;
  color: var(--sharpe-medium-gray);
  font-weight: 600;
}

/* Image Upload Section */
.image-upload-section {
  margin-bottom: 2rem;
}

.upload-area {
  border: 2px dashed var(--sharpe-light-gray);
  border-radius: var(--sharpe-radius-medium);
  padding: 2rem;
  text-align: center;
  background: #FAFAFA;
  cursor: pointer;
  transition: all 0.3s ease;
}

.upload-area:hover {
  border-color: var(--sharpe-purple);
  background: rgba(107, 76, 147, 0.05);
}

.upload-area.dragover {
  border-color: var(--sharpe-purple);
  background: rgba(107, 76, 147, 0.1);
  transform: scale(1.02);
}

.upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.upload-icon {
  font-size: 2rem;
  color: var(--sharpe-purple);
  margin-bottom: 0.5rem;
}

.upload-text {
  font-size: 1rem;
  color: var(--sharpe-charcoal);
}

.upload-hint {
  font-size: 0.85rem;
  color: var(--sharpe-medium-gray);
}

/* Image Preview */
.image-preview {
  margin-top: 1rem;
  border: 1px solid var(--sharpe-light-gray);
  border-radius: var(--sharpe-radius-medium);
  overflow: hidden;
  background: var(--sharpe-white);
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--sharpe-light-gray);
  border-bottom: 1px solid #D1CFC9;
}

.preview-title {
  font-weight: 500;
  color: var(--sharpe-charcoal);
}

.remove-image {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--sharpe-medium-gray);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.remove-image:hover {
  background: var(--sharpe-error);
  color: var(--sharpe-white);
}

.preview-content {
  padding: 1rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.preview-content img {
  max-width: 120px;
  max-height: 120px;
  border-radius: var(--sharpe-radius-small);
  object-fit: cover;
  border: 1px solid var(--sharpe-light-gray);
}

.analysis-info {
  flex: 1;
}

.analysis-loading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--sharpe-purple);
  font-size: 0.9rem;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--sharpe-light-gray);
  border-top: 2px solid var(--sharpe-purple);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Checkbox Groups */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--sharpe-radius-medium);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.checkbox-item:hover {
  background: rgba(107, 76, 147, 0.05);
  border-color: var(--sharpe-purple-light);
}

.checkbox-input {
  display: none;
}

.checkbox-custom {
  width: 20px;
  height: 20px;
  border: 2px solid var(--sharpe-light-gray);
  border-radius: 4px;
  position: relative;
  transition: all 0.3s ease;
  background: var(--sharpe-white);
}

.checkbox-input:checked + .checkbox-custom {
  background: var(--sharpe-purple);
  border-color: var(--sharpe-purple);
}

.checkbox-input:checked + .checkbox-custom::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--sharpe-white);
  font-size: 12px;
  font-weight: bold;
}

.checkbox-label {
  flex: 1;
  font-weight: 500;
  color: var(--sharpe-charcoal);
}

.checkbox-price {
  font-weight: 600;
  color: var(--sharpe-success);
  font-size: 0.9rem;
}

/* Price Summary */
.price-summary {
  background: var(--sharpe-white);
  border-radius: var(--sharpe-radius-large);
  box-shadow: var(--sharpe-shadow-medium);
  border: 1px solid var(--sharpe-light-gray);
  position: sticky;
  top: 2rem;
}

.summary-header {
  background: linear-gradient(135deg, var(--sharpe-purple) 0%, var(--sharpe-purple-dark) 100%);
  color: var(--sharpe-white);
  padding: 1.5rem;
  border-radius: var(--sharpe-radius-large) var(--sharpe-radius-large) 0 0;
}

.summary-title {
  font-family: var(--sharpe-font-primary);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.summary-content {
  padding: 1.5rem;
}

/* Price Tier */
.price-tier {
  background: rgba(107, 76, 147, 0.1);
  padding: 1rem;
  border-radius: var(--sharpe-radius-medium);
  margin-bottom: 1.5rem;
  border: 1px solid rgba(107, 76, 147, 0.2);
}

.tier-label {
  font-size: 0.85rem;
  color: var(--sharpe-medium-gray);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tier-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--sharpe-purple);
  margin-top: 0.25rem;
  display: block;
}

/* Price Breakdown */
.price-breakdown {
  margin-bottom: 1.5rem;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--sharpe-light-gray);
}

.price-row:last-child {
  border-bottom: none;
}

.subtotal-row {
  border-top: 2px solid var(--sharpe-light-gray);
  margin-top: 0.5rem;
  padding-top: 1rem;
  font-weight: 600;
}

.price-label {
  color: var(--sharpe-charcoal);
  font-size: 0.95rem;
}

.price-value {
  font-weight: 600;
  color: var(--sharpe-charcoal);
  font-size: 0.95rem;
}

/* Total Section */
.total-section {
  background: linear-gradient(135deg, var(--sharpe-purple) 0%, var(--sharpe-purple-dark) 100%);
  color: var(--sharpe-white);
  padding: 1.5rem;
  border-radius: var(--sharpe-radius-medium);
  margin-bottom: 1.5rem;
  text-align: center;
}

.total-cost {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.total-label {
  font-size: 1.1rem;
  font-weight: 500;
}

.total-value {
  font-size: 1.8rem;
  font-weight: 700;
  font-family: var(--sharpe-font-primary);
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 0.75rem;
  flex-direction: column;
}

.btn {
  padding: 0.875rem 1.5rem;
  border: none;
  border-radius: var(--sharpe-radius-medium);
  font-size: 1rem;
  font-weight: 500;
  font-family: var(--sharpe-font-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--sharpe-purple) 0%, var(--sharpe-purple-dark) 100%);
  color: var(--sharpe-white);
  box-shadow: var(--sharpe-shadow-light);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--sharpe-purple-hover) 0%, var(--sharpe-purple-dark) 100%);
  transform: translateY(-2px);
  box-shadow: var(--sharpe-shadow-medium);
}

.btn-secondary {
  background: var(--sharpe-light-gray);
  color: var(--sharpe-charcoal);
  border: 1px solid #D1CFC9;
}

.btn-secondary:hover {
  background: #D1CFC9;
  transform: translateY(-1px);
  box-shadow: var(--sharpe-shadow-light);
}

.btn-success {
  background: linear-gradient(135deg, var(--sharpe-success) 0%, #1e7e34 100%);
  color: var(--sharpe-white);
  box-shadow: var(--sharpe-shadow-light);
}

.btn-success:hover {
  background: linear-gradient(135deg, #1e7e34 0%, #155724 100%);
  transform: translateY(-2px);
  box-shadow: var(--sharpe-shadow-medium);
}

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

.btn i {
  font-size: 0.9rem;
}

/* Customer Info Section */
.customer-info-section {
  background: rgba(107, 76, 147, 0.05);
  border: 1px solid rgba(107, 76, 147, 0.2);
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

.textarea {
  min-height: 100px;
  resize: vertical;
  font-family: var(--sharpe-font-secondary);
}

/* Error Messages */
.error-message {
  background: rgba(220, 53, 69, 0.1);
  border: 1px solid rgba(220, 53, 69, 0.3);
  color: var(--sharpe-error);
  padding: 1rem;
  border-radius: var(--sharpe-radius-medium);
  margin: 1rem 0;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.error-message::before {
  content: '⚠️';
  font-size: 1.1rem;
}

/* Success Messages */
.success-message {
  background: rgba(40, 167, 69, 0.1);
  border: 1px solid rgba(40, 167, 69, 0.3);
  color: var(--sharpe-success);
  padding: 1rem;
  border-radius: var(--sharpe-radius-medium);
  margin: 1rem 0;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.success-message::before {
  content: '✅';
  font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .calculator-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .price-summary {
    position: static;
  }
}

@media (max-width: 768px) {
  .calculator-wrapper {
    padding: 1rem 0.5rem;
  }
  
  .main-title {
    font-size: 2rem;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .form-section {
    padding: 1.5rem;
  }
  
  .summary-content {
    padding: 1rem;
  }
  
  .size-inputs {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .size-separator {
    display: none;
  }
  
  .action-buttons {
    gap: 0.5rem;
  }
  
  .btn {
    padding: 1rem 1.5rem;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .calculator-wrapper {
    padding: 0.5rem;
  }
  
  .main-title {
    font-size: 1.75rem;
  }
  
  .subtitle {
    font-size: 1rem;
  }
  
  .form-section {
    padding: 1rem;
  }
  
  .summary-content {
    padding: 1rem;
  }
  
  .total-value {
    font-size: 1.5rem;
  }
  
  .checkbox-item {
    padding: 0.5rem;
  }
  
  .upload-area {
    padding: 1.5rem;
  }
}

/* Print Styles */
@media print {
  .calculator-wrapper {
    background: white;
    padding: 0;
  }
  
  .action-buttons {
    display: none;
  }
  
  .image-upload-section {
    display: none;
  }
  
  .calculator-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .form-section,
  .price-summary {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}

/* Accessibility Improvements */
.btn:focus,
.input-field:focus,
.checkbox-item:focus-within {
  outline: 2px solid var(--sharpe-purple);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --sharpe-light-gray: #CCCCCC;
    --sharpe-medium-gray: #666666;
  }
  
  .input-field,
  .checkbox-custom {
    border-width: 3px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .btn::before {
    display: none;
  }
}

