// DNC List Component Styles
.dnc-list-container {
  padding: 24px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.dnc-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;

  h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin: 0;
  }
}

.add-dnc-btn {
  background: #5f5dcf;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;

  &:hover {
    background: #4b4bb7;
  }
}

.dnc-list-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 16px;
  padding: 8px 0;

  .search-box {
    flex: 1;
    display: flex;
    align-items: center;
    input {
      width: 100%;
      padding: 12px 18px;
      border: 1.5px solid #e5e7eb;
      border-radius: 10px;
      font-size: 1.05rem;
      background: #f8f9fb;
      outline: none;
      transition: border 0.2s, box-shadow 0.2s;
      box-shadow: 0 1px 2px rgba(80,80,180,0.03);
      &:focus {
        border-color: #a78bfa;
        background: #fff;
        box-shadow: 0 2px 8px rgba(167,139,250,0.08);
      }
    }
  }

  .rows-select {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 16px;
    label {
      color: #888;
      font-size: 1rem;
      margin-right: 4px;
    }
    select {
      padding: 8px 16px;
      border: 1.5px solid #e5e7eb;
      border-radius: 10px;
      background: #fff;
      font-size: 1rem;
      outline: none;
      cursor: pointer;
      box-shadow: 0 1px 2px rgba(80,80,180,0.03);
      transition: border 0.2s;
      &:focus {
        border-color: #a78bfa;
      }
    }
  }
}

.dnc-table-wrapper {
  overflow-x: auto;
  margin-bottom: 20px;
}

.dnc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;

  th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
  }

  th {
    background: #f8f9fb;
    color: #666;
    font-weight: 500;
    white-space: nowrap;

    span {
      color: #999;
      margin-left: 4px;
      cursor: pointer;
    }
  }

  td {
    color: #333;
  }

  .status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    background: #fee2e2;
    color: #ef4444;

    &.active {
      background: #dcfce7;
      color: #22c55e;
    }
  }

  .action-buttons {
    display: flex;
    gap: 8px;

    .action-btn {
      padding: 8px 20px;
      border: none;
      border-radius: 8px;
      font-size: 1rem;
      font-weight: 500;
      cursor: pointer;
      box-shadow: 0 1px 4px rgba(80, 80, 180, 0.04);
      transition: background 0.2s, color 0.2s, box-shadow 0.2s;
      outline: none;

      &.deactivate, &.activate {
        background: #ede9fe;
        color: #7c3aed;
        border: none;
        &:hover {
          background: #c7d2fe;
          color: #5b21b6;
        }
      }

      &.delete {
        background: #fee2e2;
        color: #ef4444;
        border: none;
        &:hover {
          background: #fecaca;
          color: #b91c1c;
        }
      }
    }
  }
}

.pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;

  .page {
    background: #f3e8ff;
    color: #a78bfa;
    border-radius: 6px;
    padding: 4px 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;

    &.active, &:hover {
      background: #a78bfa;
      color: #fff;
    }
  }
}

@media (max-width: 768px) {
  .dnc-list-container {
    padding: 16px;
  }

  .dnc-list-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .dnc-table {
    font-size: 0.9rem;

    th, td {
      padding: 8px 12px;
    }
  }
}

// DNC Stats Component Styles
.dnc-stats-container {
  padding: 24px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.stats-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;

  h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin: 0;
  }

  .last-updated {
    color: #666;
    font-size: 0.9rem;
  }
}

.loading-spinner {
  text-align: center;
  padding: 40px;
  color: #666;
}

.error-message {
  text-align: center;
  padding: 20px;
  color: #ef4444;
  background: #fee2e2;
  border-radius: 8px;
  margin: 20px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: #f8f9fb;
  border-radius: 12px;
  padding: 20px;
  text-align: center;

  h3 {
    font-size: 1rem;
    color: #666;
    margin: 0 0 12px 0;
  }

  .stat-value {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
  }

  .stat-percentage {
    font-size: 0.9rem;
    color: #666;
  }

  &.total {
    background: #f3e8ff;
    .stat-value { color: #a78bfa; }
  }

  &.active {
    background: #dcfce7;
    .stat-value { color: #22c55e; }
  }

  &.inactive {
    background: #fee2e2;
    .stat-value { color: #ef4444; }
  }

  &.mobile {
    background: #dbeafe;
    .stat-value { color: #3b82f6; }
  }

  &.landline {
    background: #fef3c7;
    .stat-value { color: #d97706; }
  }
}

.sources-section {
  margin-bottom: 32px;

  h3 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 16px;
  }
}

.sources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.source-card {
  background: #f8f9fb;
  border-radius: 12px;
  padding: 16px;
  text-align: center;

  .source-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
  }

  .source-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
  }

  .source-percentage {
    font-size: 0.9rem;
    color: #666;
  }
}

.trend-section {
  h3 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 16px;
  }
}

.trend-chart {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  height: 200px;
  padding: 20px 0;
}

.trend-bar {
  flex: 1;
  background: #a78bfa;
  border-radius: 6px 6px 0 0;
  min-height: 20px;
  position: relative;
  transition: height 0.3s ease;

  .trend-value {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9rem;
    color: #666;
  }

  .trend-label {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9rem;
    color: #666;
  }
}

@media (max-width: 768px) {
  .dnc-stats-container {
    padding: 16px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .sources-grid {
    grid-template-columns: 1fr;
  }

  .trend-chart {
    height: 150px;
  }
}

// DNC Check Component Styles
.dnc-check-container {
  padding: 24px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.check-section {
  margin-bottom: 32px;

  h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 24px;
  }
}

.check-form {
  max-width: 600px;
  margin-bottom: 24px;
}

.input-group {
  margin-bottom: 16px;

  label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
  }

  input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;

    &:focus {
      outline: none;
      border-color: #a78bfa;
      box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.1);
    }

    &.error {
      border-color: #ef4444;
    }
  }

  .error-message {
    color: #ef4444;
    font-size: 0.9rem;
    margin-top: 8px;
  }
}

.button-group {
  display: flex;
  gap: 12px;

  button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;

    &:disabled {
      opacity: 0.7;
      cursor: not-allowed;
    }
  }

  .check-btn {
    background: #a78bfa;
    color: white;

    &:hover:not(:disabled) {
      background: #8b5cf6;
    }
  }

  .clear-btn {
    background: #f3f4f6;
    color: #666;

    &:hover:not(:disabled) {
      background: #e5e7eb;
    }
  }
}

.check-result {
  margin-top: 24px;
}

.result-card {
  background: #f8f9fb;
  border-radius: 12px;
  padding: 20px;
  max-width: 600px;

  &.found {
    background: #fee2e2;
  }

  h3 {
    font-size: 1.2rem;
    color: #333;
    margin: 0 0 16px 0;
  }
}

.result-details {
  p {
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;

    .label {
      font-size: 0.9rem;
      color: #666;
      min-width: 100px;
    }

    .value {
      font-size: 1rem;
      color: #333;
      font-weight: 500;

      &.found {
        color: #ef4444;
      }
    }
  }
}

.recent-checks-section {
  h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 24px;
  }
}

.loading-spinner {
  text-align: center;
  padding: 40px;
  color: #666;
}

.recent-checks-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.check-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: #f8f9fb;
  border-radius: 8px;
  transition: background-color 0.3s ease;

  &:hover {
    background: #f3f4f6;
  }

  .check-info {
    display: flex;
    flex-direction: column;
    gap: 4px;

    .phone-number {
      font-size: 1rem;
      color: #333;
      font-weight: 500;
    }

    .check-date {
      font-size: 0.9rem;
      color: #666;
    }
  }

  .check-status {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    background: #dcfce7;
    color: #22c55e;

    &.found {
      background: #fee2e2;
      color: #ef4444;
    }
  }
}

.no-checks {
  text-align: center;
  padding: 40px;
  color: #666;
  background: #f8f9fb;
  border-radius: 8px;
}

@media (max-width: 768px) {
  .dnc-check-container {
    padding: 16px;
  }

  .button-group {
    flex-direction: column;
  }

  .check-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;

    .check-status {
      align-self: flex-start;
    }
  }
}

// DNC Modal Styles
.dnc-modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.25);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dnc-modal {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  width: 100%;
  max-width: 420px;
  padding: 0;
  animation: modalIn 0.2s;
}

@keyframes modalIn {
  from { transform: translateY(40px) scale(0.98); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0 24px;
  border-radius: 16px 16px 0 0;

  h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin: 0;
  }

  .close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
    padding: 0 0 4px 0;
    &:hover { color: #ef4444; }
  }
}

.modal-body {
  padding: 24px;
}

.form-group {
  margin-bottom: 18px;

  label {
    display: block;
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 6px;
  }

  input, select, textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    background: #f8f9fb;
    outline: none;
    transition: border 0.2s;
    resize: none;
    margin-bottom: 2px;
    &:focus { border-color: #a78bfa; }
  }
}

.error-message {
  color: #ef4444;
  font-size: 0.95rem;
  margin-top: 8px;
  text-align: center;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 0 24px 20px 24px;

  .submit-btn {
    background: #5f5dcf;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 24px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    &:hover { background: #4b4bb7; }
  }
  .cancel-btn {
    background: #f3f4f6;
    color: #666;
    border: none;
    border-radius: 8px;
    padding: 10px 24px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    &:hover { background: #e5e7eb; }
  }
}

@media (max-width: 600px) {
  .dnc-modal {
    max-width: 98vw;
    padding: 0;
  }
  .modal-header, .modal-body, .modal-footer {
    padding-left: 12px;
    padding-right: 12px;
  }
}
