/* Font Face - Font locali */
@font-face {
    font-family: 'Whitney';
    src: url('./WHITNEY/Whitney-Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Whitney';
    src: url('./WHITNEY/Whitney-Book.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Whitney';
    src: url('./WHITNEY/Whitney-Semibold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'Mont';
    src: url('./MONT/Mont-Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Mont';
    src: url('./MONT/Mont-Bold.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Mont';
    src: url('./MONT/Mont-Heavy.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
}

:root {
  --magenta: #e6316c;
  --black: #000000;
  --white: #ffffff;
  --orange: #ff8c00;
  --radius-ext: 8px;
  --radius-int: 4px;
  
  /* Colori per i box */
  --success-color: #059669;
  --error-color: #e6316c;
  
  /* Font family */
  --font-family: 'Whitney', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--magenta);
  line-height: 1.6;
  padding: 0;
  margin: 0;
}

/* Header Container */
.header-container {
  max-width: 800px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 0 0 0;
  margin: 0 auto;
  background-color: var(--magenta);
}

.logo {
  height: 40px;
  width: auto;
}

.header-container h1 {
  font-weight: 400;
  font-size: 1.2rem;
  color: var(--white);
  margin: 0;
  text-transform: lowercase;
  letter-spacing: 0.5px;
}

.container {
  max-width: 800px;
  margin: 20px auto;
  background: var(--white);
  border-radius: var(--radius-ext);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  padding: 30px;
}


.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--black);
}

input[type="text"], input[type="url"] {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-int);
  font-size: 16px;
  transition: border-color 0.2s ease;
}

input[type="text"]:focus, input[type="url"]:focus {
  outline: none;
  border-color: var(--magenta);
}

button {
  background-color: var(--magenta);
  color: var(--white);
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius-int);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
  width: 100%;
}

button:hover:not(:disabled) {
  background-color: var(--black);
}

button:disabled {
  background-color: rgba(0, 0, 0, 0.3);
  cursor: not-allowed;
}

.result-container {
  margin-top: 30px;
  padding: 20px;
  border-radius: var(--radius-int);
  border: 2px solid rgba(0, 0, 0, 0.1);
  min-height: 100px;
}

.result-success {
  border-color: var(--success-color);
  background-color: rgba(5, 150, 105, 0.1);
}

.result-error {
  border-color: var(--error-color);
  background-color: rgba(230, 49, 108, 0.1);
}

.save-message {
  color: var(--success-color);
  font-weight: 500;
  margin-top: 12px;
}

.retry-btn {
  background-color: var(--magenta);
  color: var(--white);
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-int);
  font-size: 14px;
  cursor: pointer;
  margin-top: 12px;
  transition: background-color 0.2s ease;
}

.retry-btn:hover {
  background-color: var(--black);
}

.result-title {
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--black);
}

.result-json {
  background-color: rgba(0, 0, 0, 0.05);
  padding: 15px;
  border-radius: var(--radius-int);
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 14px;
  white-space: pre-wrap;
  word-break: break-all;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.result-separator {
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  margin: 12px 0 16px 0;
}

.pending-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.discard-link {
  background: #eee;
  border: none;
  color: var(--black);
  font-weight: 600;
  font-size: 12px;
  width: auto;
  cursor: pointer;
  transition: color 0.2s ease;
}

.discard-link:hover {
  color: var(--white);
}

.loading {
  text-align: center;
  color: rgba(0, 0, 0, 0.6);
  font-style: italic;
}

.error-message {
  color: var(--error-color);
  font-weight: 500;
}



.url-text {
  color:  var(--magenta);
  font-weight: 600;
  text-decoration: underline;
}

.upload-text {
  color: rgba(0, 0, 0, 0.6);
}

input:checked + .slider .url-text {
  color: rgba(0, 0, 0, 0.6);
  font-weight: 400;
  text-decoration: none;
}

input:checked + .slider .upload-text {
  color: var(--magenta);
  font-weight: 600;
  text-decoration: underline;
}

/* File Input Styles */
input[type="file"] {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-int);
  font-size: 16px;
  background-color: white;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

input[type="file"]:focus {
  outline: none;
  border-color: var(--magenta);
}

/* Select Styles */
select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-int);
  font-size: 16px;
  background-color: white;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

select:focus {
  outline: none;
  border-color: var(--magenta);
}

select option {
  padding: 8px;
}

.file-info {
  margin-top: 8px;
  color: var(--secondary-color);
}

.file-info small {
  font-size: 12px;
}

/* Hidden class */
.hidden {
  display: none !important;
}

/* Progress Bar Styles */
.progress-container {
  margin-top: 20px;
  text-align: center;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--magenta), var(--black));
  border-radius: 4px;
  animation: progress-animation 2s ease-in-out infinite;
}

@keyframes progress-animation {
  0% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(100%);
  }
}

.progress-text {
  color: rgba(0, 0, 0, 0.6);
  font-size: 14px;
  font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
  .header-container {
    gap: 10px;
    text-align: center;
    padding-bottom: 0px !important;
    padding-top: 20px !important;
  }
  
  .logo {
    height: 35px;
  }
  
  .header-container h1 {
    font-size: 1.25rem;
  }
  
  .container {
    margin: 15px;
    padding: 20px;
  }
  
  .switch {
    height: 20px;
  }
  
  .slider {
    width: 32px;
    height: 16px;
  }
  
  .slider:before {
    height: 10px;
    width: 10px;
  }
  
  input:checked + .slider:before {
    transform: translateX(16px);
  }
  
  .switch-text {
    font-size: 0.7rem;
  }
  
}

@media (max-width: 480px) {
  .header-container {
    padding: 10px 15px;
  }
  
  .logo {
    height: 30px;
  }
  
  .header-container h1 {
    font-size: 1.1rem;
  }
  
  .container {
    margin: 10px;
    padding: 15px;
  }
  
  .switch {
    height: 18px;
  }
  
  .slider {
    width: 28px;
    height: 14px;
  }
  
  .slider:before {
    height: 8px;
    width: 8px;
  }
  
  input:checked + .slider:before {
    transform: translateX(14px);
  }
  
  .switch-text {
    font-size: 0.65rem;
  }

}

/* Switch Styles - Nuovo stile compatto */
.switch-label {
  font-weight: 500;
  margin-bottom: 10px;
  display: block;
}

.switch-container {
  display: flex;
  justify-content: left;
  margin-bottom: 20px;
}

.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: auto;
  height: 22px;
  margin: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: relative;
  display: inline-block;
  cursor: pointer;
  width: 36px;
  height: 18px;
  background-color: #ccc;
  transition: 0.3s;
  flex-shrink: 0;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 12px;
  width: 12px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--magenta);
}

input:checked + .slider:before {
  transform: translateX(18px);
}

.switch-text {
  margin-left: 8px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--black);
}
