/**
 * WorkCoins Widget Styles
 * Современный дизайн для отображения WorkCoins баланса
 */

.workcoins-widget {
  background: #ffffff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.workcoins-widget:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Header */
.workcoins-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.workcoins-title {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.workcoins-actions .btn-sm {
  padding: 6px 12px;
  font-size: 14px;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.workcoins-actions .btn-sm:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

/* Main Balance */
.workcoins-main {
  margin-bottom: 20px;
}

.workcoins-primary {
  text-align: center;
  margin-bottom: 16px;
}

.workcoins-value {
  font-size: 48px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1;
  margin-bottom: 8px;
}

.workcoins-unit {
  font-size: 20px;
  font-weight: 400;
  color: #666;
}

.workcoins-subtitle {
  font-size: 14px;
  color: #666;
}

/* Progress Bar */
.workcoins-progress-container {
  margin-top: 16px;
}

.workcoins-progress-bar {
  height: 12px;
  background: #f0f0f0;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.workcoins-progress-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.3s ease, background-color 0.3s ease;
}

.workcoins-status-ok .workcoins-progress-fill {
  background: linear-gradient(90deg, #4caf50, #66bb6a);
}

.workcoins-status-info .workcoins-progress-fill {
  background: linear-gradient(90deg, #2196f3, #42a5f5);
}

.workcoins-status-warning .workcoins-progress-fill {
  background: linear-gradient(90deg, #ff9800, #ffb74d);
}

.workcoins-status-critical .workcoins-progress-fill {
  background: linear-gradient(90deg, #f44336, #ef5350);
}

.workcoins-progress-label {
  text-align: center;
  font-size: 12px;
  color: #666;
  margin-top: 8px;
}

/* Bonus WorkCoins */
.workcoins-bonus {
  background: #f0f7ff;
  border: 1px solid #bbdefb;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.workcoins-bonus-label {
  font-size: 14px;
  font-weight: 500;
  color: #1976d2;
}

.workcoins-bonus-value {
  font-size: 16px;
  font-weight: 600;
  color: #1976d2;
}

/* Overage */
.workcoins-overage {
  background: #fff3e0;
  border: 1px solid #ffe0b2;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.workcoins-overage-label {
  font-size: 12px;
  font-weight: 500;
  color: #f57c00;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.workcoins-overage-value {
  font-size: 14px;
  font-weight: 600;
  color: #e65100;
  margin-bottom: 8px;
}

.workcoins-overage-bar {
  height: 6px;
  background: #ffe0b2;
  border-radius: 3px;
  overflow: hidden;
}

.workcoins-overage-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff9800, #fb8c00);
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* Footer */
.workcoins-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid #e0e0e0;
  font-size: 12px;
  color: #666;
}

.workcoins-reset {
  display: flex;
  align-items: center;
  gap: 4px;
}

.workcoins-help a {
  color: #2196f3;
  text-decoration: none;
  font-weight: 500;
}

.workcoins-help a:hover {
  text-decoration: underline;
}

/* Error State */
.workcoins-error {
  text-align: center;
  padding: 40px 24px;
}

.workcoins-error-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.workcoins-error-message {
  font-size: 16px;
  color: #666;
  margin-bottom: 20px;
}

/* Loading State */
.workcoins-loading {
  text-align: center;
  padding: 60px 24px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f0f0f0;
  border-top-color: #2196f3;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Status Indicators */
.workcoins-status-critical {
  border-left: 4px solid #f44336;
}

.workcoins-status-warning {
  border-left: 4px solid #ff9800;
}

.workcoins-status-info {
  border-left: 4px solid #2196f3;
}

.workcoins-status-ok {
  border-left: 4px solid #4caf50;
}

/* Responsive */
@media (max-width: 768px) {
  .workcoins-widget {
    padding: 16px;
  }

  .workcoins-value {
    font-size: 36px;
  }

  .workcoins-unit {
    font-size: 16px;
  }

  .workcoins-footer {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

