/* assets/css/frontend.css */

.transformu-container {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  color: #202124;
}

.transformu-header {
  text-align: center;
  margin-bottom: 30px;
}

.transformu-header h2 {
  font-size: 32px;
  font-weight: 300;
  margin-bottom: 10px;
  color: #1a73e8;
}

.transformu-header p {
  font-size: 18px;
  opacity: 0.8;
  margin: 0;
}

.transformu-steps {
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.step-container {
  padding: 25px;
  border-bottom: 1px solid #dadce0;
}

.step-container:last-child {
  border-bottom: none;
}

.step-container h3 {
  font-size: 20px;
  font-weight: 500;
  margin-top: 0;
  margin-bottom: 20px;
  color: #1a73e8;
}

/* Image Upload */
.image-upload-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.upload-area {
  width: 100%;
  max-width: 400px;
  height: 250px;
  border: 2px dashed #dadce0;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 20px;
}

.upload-area:hover, .upload-area.dragover {
  border-color: #1a73e8;
  background-color: rgba(26, 115, 232, 0.05);
}

.upload-icon {
  font-size: 48px;
  margin-bottom: 15px;
}

.upload-area p {
  margin: 5px 0;
}

.upload-note {
  font-size: 14px;
  opacity: 0.7;
  max-width: 250px;
}

.preview-container {
  text-align: center;
}

.preview-image {
  max-width: 100%;
  max-height: 400px;
  border-radius: 8px;
  margin-bottom: 15px;
}

.change-image-button {
  background-color: #f8f9fa;
  color: #1a73e8;
  border: 1px solid #dadce0;
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.change-image-button:hover {
  background-color: #f1f3f4;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Weight Form */
.size-form {
  max-width: 500px;
  margin: 0 auto;
}

.unit-toggle {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.unit-toggle button {
  background-color: #f8f9fa;
  border: 1px solid #dadce0;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.unit-toggle button:first-child {
  border-radius: 4px 0 0 4px;
}

.unit-toggle button:last-child {
  border-radius: 0 4px 4px 0;
}

.unit-toggle button.active {
  background-color: #1a73e8;
  color: white;
  border-color: #1a73e8;
}

.weight-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.input-group {
  display: flex;
  flex-direction: column;
}

.input-group label {
  font-size: 14px;
  margin-bottom: 8px;
  color: #5f6368;
}

.weight-input-container {
  position: relative;
  display: flex;
}

.weight-input-container input {
  width: 100%;
  padding: 10px;
  border: 1px solid #dadce0;
  border-radius: 4px;
  font-size: 16px;
  transition: border-color 0.2s ease;
  padding-right: 40px;
}

.weight-input-container input:focus {
  border-color: #1a73e8;
  outline: none;
}

.weight-unit {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #5f6368;
  font-size: 14px;
}

.submit-button {
  width: 100%;
  background-color: #1a73e8;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 12px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.submit-button:hover {
  background-color: #0d61cb;
}

/* Weight Summary */
.size-summary {
  max-width: 500px;
  margin: 0 auto;
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 15px;
  position: relative;
}

.weight-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.summary-item {
  display: flex;
  flex-direction: column;
  text-align: center;
}

.summary-label {
  font-size: 14px;
  color: #5f6368;
  margin-bottom: 5px;
}

.summary-value {
  font-size: 20px;
  font-weight: 500;
}

.edit-size-button {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: #1a73e8;
  font-size: 14px;
  cursor: pointer;
}

/* Payment Section */
.payment-info {
  text-align: center;
  margin-bottom: 20px;
  font-size: 16px;
}

.payment-form {
  max-width: 400px;
  margin: 0 auto;
}

.card-element-container {
  border: 1px solid #dadce0;
  padding: 15px;
  border-radius: 4px;
  background-color: white;
  margin-bottom: 20px;
}

#card-element {
  padding: 10px 0;
}

#card-errors {
  color: #d93025;
  font-size: 14px;
  text-align: center;
  margin-top: 10px;
  min-height: 20px;
}

.payment-button {
  width: 100%;
  background-color: #1a73e8;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 12px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.payment-button:hover {
  background-color: #0d61cb;
}

.payment-button:disabled {
  background-color: #dadce0;
  cursor: not-allowed;
}

.payment-success {
  text-align: center;
  padding: 20px;
}

.success-icon {
  width: 50px;
  height: 50px;
  background-color: #34a853;
  border-radius: 50%;
  color: white;
  font-size: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
}

/* Result Section */
.comparison-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}

@media (min-width: 768px) {
  .comparison-container {
    flex-direction: row;
    justify-content: center;
  }
}

.image-container {
  text-align: center;
}

.result-image {
  max-width: 100%;
  max-height: 300px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 10px;
}

.image-label {
  background-color: #f8f9fa;
  border-radius: 4px;
  padding: 5px 10px;
  display: inline-block;
}

.image-label span {
  display: block;
  text-align: center;
}

.image-label span:first-child {
  font-size: 14px;
  color: #5f6368;
}

.image-label .weight-label {
  font-weight: 500;
}

.arrow-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.arrow {
  font-size: 32px;
  color: #5f6368;
}

@media (max-width: 767px) {
  .arrow {
    transform: rotate(90deg);
  }
}

.motivation-message {
  background-color: #e8f0fe;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
  text-align: center;
  color: #174ea6;
}

.share-container {
  text-align: center;
}

.share-url-container {
  display: flex;
  max-width: 500px;
  margin: 10px auto 0;
}

.share-url-input {
  flex: 1;
  padding: 10px;
  border: 1px solid #dadce0;
  border-radius: 4px 0 0 4px;
  font-size: 14px;
}

.copy-button {
  background-color: #1a73e8;
  color: white;
  border: none;
  border-radius: 0 4px 4px 0;
  padding: 0 15px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.copy-button:hover {
  background-color: #0d61cb;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top: 4px solid #1a73e8;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

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