:root {
  --log-bg: #1F2229;
  --log-text: #E6E6E6;
  --log-border: #2C303B;
  --log-success: #0fac1e;
  --log-error: #D30C1E;
  --log-warning: #FFBE00;
  --log-info: #0F8DCB;
  --log-timestamp: #7B8990;
  --log-padding: 15px;
  --log-border-radius: 4px;
}

.cron-logs {
  background: var(--log-bg);
  border-radius: var(--log-border-radius);
  color: var(--log-text);
  font-family: monospace;
  height: 300px;
  overflow-y: auto;
  position: relative;

  .logs-header {
    position: sticky;
    top: 0;
    background: var(--log-bg);
    padding: var(--log-padding);
    border-bottom: 1px solid var(--log-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1;

    .title {
      font-weight: bold;
      font-size: 14px;
    }

    .actions {
      display: flex;
      gap: 10px;

      .btn {
        padding: 5px 10px;
        border-radius: 3px;
        cursor: pointer;
        font-size: 12px;
        
        &.btn-clear {
          background: var(--log-error);
          color: white;
        }
        
        &.btn-download {
          background: var(--log-info);
          color: white;
        }
      }
    }
  }

  .logs-content {
    padding: var(--log-padding);

    .log-entry {
      display: flex;
      padding: 8px 0;
      border-bottom: 1px solid var(--log-border);
      font-size: 13px;
      line-height: 1.4;

      &:last-child {
        border-bottom: none;
      }

      .timestamp {
        color: var(--log-timestamp);
        min-width: 150px;
        padding-right: 15px;
      }

      .level {
        min-width: 80px;
        padding-right: 15px;
        font-weight: bold;

        &.success { color: var(--log-success); }
        &.error { color: var(--log-error); }
        &.warning { color: var(--log-warning); }
        &.info { color: var(--log-info); }
      }

      .message {
        flex: 1;
        word-break: break-word;
      }

      &:hover {
        background: rgba(255,255,255,0.03);
      }
    }
  }

  .logs-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: var(--log-timestamp);
    font-style: italic;
  }

  /* Scrollbar styling */
  &::-webkit-scrollbar {
    width: 8px;
  }

  &::-webkit-scrollbar-track {
    background: var(--log-bg);
  }

  &::-webkit-scrollbar-thumb {
    background: var(--log-border);
    border-radius: 4px;
    
    &:hover {
      background: var(--log-timestamp);
    }
  }
}

/* Responsive styles */
@media (max-width: 768px) {
  .cron-logs {
    height: 400px; /* Większa wysokość na mobile */

    .log-entry {
      flex-direction: column;
      padding: 10px 0;

      .timestamp {
        min-width: auto;
        padding-bottom: 5px;
      }

      .level {
        min-width: auto;
        padding-bottom: 5px;
      }
    }
  }
}

/* Animation for new logs */
@keyframes newLog {
  from {
    background-color: rgba(255,255,255,0.1);
  }
  to {
    background-color: transparent;
  }
}

.log-entry.new {
  animation: newLog 2s ease-out;
}

/* Expandable log details */
.log-entry.expandable {
  cursor: pointer;

  .details {
    display: none;
    margin-top: 10px;
    padding: 10px;
    background: rgba(0,0,0,0.2);
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
  }

  &.expanded .details {
    display: block;
  }
} 