/* ArmsEast Canadian Proxy Service Styles */

:root {
  --ae-primary: #c0392b;
  --ae-primary-dark: #a93226;
  --ae-secondary: #2c3e50;
  --ae-success: #27ae60;
  --ae-warning: #f39c12;
  --ae-danger: #e74c3c;
  --ae-info: #3498db;
  --ae-light: #ecf0f1;
  --ae-dark: #2c3e50;
  --ae-border: #bdc3c7;
  --ae-shadow: 0 2px 10px rgba(0,0,0,0.1);
  --ae-radius: 8px;
  --ae-transition: all 0.3s ease;
}

/* Main Container */
.ae-proxy-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--ae-secondary);
}

/* Login Required Section */
.ae-proxy-login-required {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
  padding: 40px 20px;
}

.ae-login-box {
  background: white;
  border-radius: var(--ae-radius);
  box-shadow: var(--ae-shadow);
  padding: 40px;
  text-align: center;
  max-width: 400px;
  width: 100%;
}

.ae-login-box h3 {
  color: var(--ae-primary);
  margin-bottom: 20px;
  font-size: 1.5em;
}

.ae-login-actions {
  display: flex;
  gap: 15px;
  margin-top: 30px;
  justify-content: center;
}

/* Search Interface */
.ae-proxy-search {
  background: white;
  border-radius: var(--ae-radius);
  box-shadow: var(--ae-shadow);
  padding: 30px;
  margin-bottom: 30px;
}

.ae-search-form {
  display: grid;
  grid-template-columns: 1fr 200px auto;
  gap: 15px;
  margin-bottom: 30px;
  align-items: end;
}

.ae-search-results {
  min-height: 200px;
}

.ae-search-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  color: #666;
}

.ae-search-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.ae-search-item {
  background: white;
  border: 1px solid var(--ae-border);
  border-radius: var(--ae-radius);
  padding: 20px;
  transition: var(--ae-transition);
  position: relative;
}

.ae-search-item:hover {
  box-shadow: var(--ae-shadow);
  transform: translateY(-2px);
}

.ae-search-item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 15px;
}

.ae-search-item h4 {
  margin: 0 0 10px 0;
  font-size: 1.1em;
  color: var(--ae-secondary);
  line-height: 1.3;
}

.ae-search-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 0;
  font-weight: 600;
}

.ae-current-price {
  color: var(--ae-primary);
  font-size: 1.1em;
}

.ae-estimated-total {
  color: var(--ae-success);
  font-size: 0.9em;
}

.ae-item-meta {
  font-size: 0.85em;
  color: #666;
  margin-bottom: 15px;
}

.ae-item-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

/* Customer Summary */
.ae-customer-summary {
  background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%);
  border: 1px solid #c3e6c3;
  border-radius: var(--ae-radius);
  padding: 20px;
  margin-bottom: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ae-customer-info h3 {
  margin: 0 0 5px 0;
  color: #2d5a2d;
  font-size: 1.2em;
}

.ae-customer-info p {
  margin: 0;
  color: #4a7c4a;
  font-size: 0.95em;
}

/* Authorization Page */
.ae-proxy-authorize {
  max-width: 800px;
  margin: 0 auto;
}

.ae-item-details, .ae-pricing-breakdown, .ae-payment-section {
  background: white;
  border-radius: var(--ae-radius);
  box-shadow: var(--ae-shadow);
  padding: 25px;
  margin-bottom: 25px;
}

.ae-item-card {
  background: #f8f9fa;
  border: 1px solid var(--ae-border);
  border-radius: 6px;
  padding: 20px;
  margin-top: 15px;
}

.ae-item-card h4 {
  margin: 0 0 15px 0;
  color: var(--ae-primary);
  font-size: 1.2em;
}

.ae-item-card p {
  margin: 8px 0;
  color: #555;
}

/* Pricing Breakdown */
.ae-pricing-breakdown h3 {
  text-align: center;
  color: var(--ae-secondary);
  margin-bottom: 25px;
  font-size: 1.4em;
}

.ae-price-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}

.ae-price-line:last-child {
  border-bottom: none;
  border-top: 2px solid var(--ae-primary);
  margin-top: 10px;
  padding-top: 15px;
  font-weight: 700;
  font-size: 1.1em;
  color: var(--ae-primary);
}

.ae-pricing-note {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 6px;
  padding: 15px;
  margin-top: 20px;
  color: #856404;
  font-size: 0.95em;
}

/* Form Elements */
.ae-form-group {
  margin-bottom: 20px;
}

.ae-form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--ae-secondary);
}

.ae-form-group input,
.ae-form-group select,
.ae-form-group textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  font-size: 1em;
  transition: var(--ae-transition);
  background: white;
}

.ae-form-group input:focus,
.ae-form-group select:focus,
.ae-form-group textarea:focus {
  outline: none;
  border-color: var(--ae-primary);
  box-shadow: 0 0 0 3px rgba(192,57,43,0.1);
}

.ae-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}

/* Buttons */
.ae-btn {
  display: inline-block;
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 1em;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: var(--ae-transition);
  line-height: 1;
}

.ae-btn-primary {
  background: linear-gradient(135deg, var(--ae-primary), var(--ae-primary-dark));
  color: white;
}

.ae-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(192,57,43,0.3);
  color: white;
  text-decoration: none;
}

.ae-btn-secondary {
  background: #6c757d;
  color: white;
}

.ae-btn-secondary:hover {
  background: #545b62;
  color: white;
  text-decoration: none;
}

.ae-btn-success {
  background: var(--ae-success);
  color: white;
}

.ae-btn-large {
  padding: 16px 32px;
  font-size: 1.1em;
  min-width: 250px;
  margin: 20px auto;
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ae-btn:disabled {
  background: #ccc !important;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Orders Page */
.ae-proxy-orders {
  max-width: 1000px;
  margin: 0 auto;
}

.ae-no-orders {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: var(--ae-radius);
  box-shadow: var(--ae-shadow);
}

.ae-orders-list {
  display: grid;
  gap: 20px;
}

.ae-order-card {
  background: white;
  border-radius: var(--ae-radius);
  box-shadow: var(--ae-shadow);
  padding: 25px;
  transition: var(--ae-transition);
}

.ae-order-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.ae-order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.ae-order-header h4 {
  margin: 0;
  color: var(--ae-secondary);
  font-size: 1.2em;
}

.ae-order-status {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ae-status-authorized { background: #e3f2fd; color: #1976d2; }
.ae-status-processing { background: #fff3e0; color: #f57c00; }
.ae-status-won { background: #e8f5e8; color: #388e3c; }
.ae-status-lost { background: #ffebee; color: #d32f2f; }
.ae-status-completed { background: #e8f5e8; color: #2e7d32; }
.ae-status-shipped { background: #e1f5fe; color: #0277bd; }

.ae-order-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.ae-order-details p {
  margin: 0;
  font-size: 0.95em;
  color: #555;
}

.ae-order-actions {
  display: flex;
  gap: 10px;
}

/* Profile Page */
.ae-proxy-profile {
  max-width: 800px;
  margin: 0 auto;
}

.ae-profile-section {
  background: white;
  border-radius: var(--ae-radius);
  box-shadow: var(--ae-shadow);
  padding: 25px;
  margin-bottom: 25px;
}

.ae-profile-section h3 {
  color: var(--ae-secondary);
  margin-bottom: 20px;
  font-size: 1.3em;
  border-bottom: 2px solid var(--ae-primary);
  padding-bottom: 8px;
}

/* Notifications */
.ae-notification {
  padding: 15px 20px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-weight: 500;
}

.ae-notification-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.ae-notification-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.ae-notification-warning {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

/* Responsive Design */
@media (max-width: 768px) {
  .ae-proxy-container {
    padding: 15px;
  }
  
  .ae-search-form {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .ae-search-grid {
    grid-template-columns: 1fr;
  }
  
  .ae-customer-summary {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  
  .ae-form-row {
    grid-template-columns: 1fr;
  }
  
  .ae-order-details {
    grid-template-columns: 1fr;
  }
  
  .ae-order-header {
    flex-direction: column;
    gap: 10px;
    align-items: start;
  }
  
  .ae-btn-large {
    min-width: auto;
    width: 100%;
  }
  
  .ae-login-actions {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .ae-search-item,
  .ae-order-card,
  .ae-profile-section {
    padding: 20px 15px;
  }
  
  .ae-item-actions,
  .ae-order-actions {
    flex-direction: column;
  }
}

/* Loading States */
.ae-loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--ae-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Stripe Elements */
.StripeElement {
  background: white;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  padding: 12px;
  transition: var(--ae-transition);
}

.StripeElement--focus {
  border-color: var(--ae-primary);
  box-shadow: 0 0 0 3px rgba(192,57,43,0.1);
}

.StripeElement--invalid {
  border-color: var(--ae-danger);
}

/* Animations */
.ae-fade-in {
  animation: fadeIn 0.5s ease-in;
}

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

.ae-slide-up {
  animation: slideUp 0.3s ease-out;
}

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