/**
 * Work Hour Calculator - Main Stylesheet
 * 
 * This stylesheet provides the styling for the Work Hour Calculator plugin
 */

 .whc-calculator {
  max-width: 850px;
  margin: 0 auto 30px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  background-color: #ffffff;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

.whc-calculator:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
}

.whc-header {
  padding: 10px;
  background: #1acc95;
  color: white;
  display: flex;
  align-items: center;
}

.whc-icon-container {
  width: 25px;
  height: 25px;
  background-color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
}

.whc-icon {
  color: #fff;
}

.whc-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
}

.whc-body {
  padding: 20px;
}

.whc-error-message {
  margin-bottom: 20px;
  padding: 12px;
  border-left: 4px solid #e53e3e;
  background-color: #fff5f5;
  color: #c53030;
  font-size: 0.9rem;
  display: flex;
  align-items: flex-start;
}

.whc-field-group {
  margin-bottom: 20px;
}

.whc-label {
  display: flex;
  align-items: center;
  font-weight: 500;
  margin-bottom: 8px;
  font-size: 0.95rem;
  color: #2d3748;
}

.whc-tooltip {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: rgb(156, 227, 205);
  color: #000;
  font-size: 0.85rem;
  margin-left: 8px;
  cursor: help;
  position: relative;
}

.whc-tooltip:hover:after {
  content: attr(data-tooltip);
  position: absolute;
  left: 100%;
  top: 0;
  background-color: #2d3748;
  color: white;
  padding: 8px 12px;
  border-radius: 4px;
  z-index: 10;
  width: 200px;
  font-weight: normal;
  font-size: 0.8rem;
  line-height: 1.4;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.whc-tooltip:hover:before {
  content: '';
  position: absolute;
  left: 100%;
  top: 10px;
  border: 5px solid transparent;
  border-right-color: #2d3748;
  z-index: 11;
}

.whc-time-input {
  display: flex;
  align-items: center;
}

.whc-select-wrapper {
  position: relative;
  flex: 1;
}

.whc-select-wrapper:after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #4a5568;
  pointer-events: none;
}

.whc-select {
  width: 100%;
  height: 42px;
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.95rem;
  appearance: none;
  color: #2d3748;
  transition: border-color 0.2s ease;
}

.whc-select:hover {
  border-color: #a0aec0;
}

.whc-select:focus {
  outline: none;
  border-color: #2ee0a9;
  box-shadow: 0 0 0 3px rgba(84, 100, 227, 0.15);
}

.whc-time-separator {
  font-size: 1.5rem;
  margin: 0 12px;
  color: #4a5568;
}

.whc-time-unit {
  margin-left: 12px;
  font-size: 1rem;
  color: #4a5568;
}

.whc-breaks-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.whc-add-break-button {
  display: flex;
  align-items: center;
  padding: 6px 10px;
  background-color: rgb(156, 227, 205);
  color: #000000;
  border: none;
  border-radius: 4px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.whc-add-break-button svg {
  margin-right: 5px;
}

.whc-add-break-button:hover {
  background-color: #f8fafc;
  color: #718096;
}

.whc-break-entry {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.whc-break-number {
  width: 30px;
  font-weight: 500;
  color: #4a5568;
}

.whc-break-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.95rem;
  color: #000;
  transition: border-color 0.2s ease;
}

.whc-break-input:hover {
  border-color: #a0aec0;
}

.whc-break-input:focus {
  outline: none;
  border-color: #1acc95;
  box-shadow: 0 0 0 3px rgba(84, 100, 227, 0.15);
}

.whc-break-unit {
  margin-left: 12px;
  font-size: 1rem;
  color: #4a5568;
  width: 50px;
}

.whc-remove-break {
  background: none;
  border: none;
  color: #adc4bd;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s ease;
}

.whc-remove-break:hover {
  color: #000;
}

.whc-input-wrapper {
  position: relative;
}

.whc-input {
  width: 100%;
  height: 42px;
  padding: 4px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.95rem;
  color: #000;
  transition: border-color 0.2s ease;
}

.whc-input:hover {
  border-color: #a0aec0;
}

.whc-input:focus {
  outline: none;
  border-color: #1acc95;
  box-shadow: 0 0 0 3px rgba(84, 100, 227, 0.15);
}

.whc-input-unit {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #718096;
}

.whc-buttons {
  margin-top: 30px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.whc-submit-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  background-color: #1acc95;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.whc-button-icon {
  margin-right: 8px;
}

.whc-submit-button:hover {
  background-color: #00b078;
}

.whc-reset-button {
  padding: 12px;
  background-color: transparent;
  color: #4a5568;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.whc-reset-button:hover {
  background-color: #f7fafc;
  border-color: #a0aec0;
  color: #6f6f6f;
}

.whc-results {
  margin-top: 30px;
  padding-top: 25px;
  border-top: 1px solid #e2e8f0;
  animation: fadeIn 0.3s ease-out forwards;
}

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

.whc-results-title {
  display: flex;
  align-items: center;
  font-size: 1.2rem;
  font-weight: 600;
  color: #2d3748;
  margin-top: 0;
  margin-bottom: 20px;
}

.whc-results-icon {
  margin-right: 8px;
  color: #1acc95;
}

.whc-results-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.whc-result-item {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 16px;
}

.whc-result-label {
  font-size: 0.8rem;
  color: #718096;
  margin-bottom: 4px;
}

.whc-result-value {
  font-size: 1.15rem;
  font-weight: 600;
  color: #1acc95;
}

.whc-result-pay {
  font-size: 1.15rem;
  font-weight: 600;
  color: #42b983;
}

.whc-summary {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 16px;
  display: flex;
  align-items: flex-start;
  color: #718096;
  font-size: 0.95rem;
  line-height: 1.5;
}

.whc-summary-icon {
  margin-right: 10px;
  margin-top: 2px;
  flex-shrink: 0;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .whc-results-grid {
    grid-template-columns: 1fr;
  }
  
  .whc-calculator {
    margin-left: 15px;
    margin-right: 15px;
  }
  
  .whc-tooltip:hover:after {
    left: auto;
    right: 0;
    width: 180px;
  }
  
  .whc-tooltip:hover:before {
    left: auto;
    right: 5px;
    border-right-color: transparent;
    border-bottom-color: #2d3748;
    top: 100%;
  }
}