/* ============================================================
   Invoice App – Eco Theme Styles
   ============================================================ */

:root {
  --eco-primary: #4CAF50;
  --eco-primary-dark: #388E3C;
  --eco-primary-light: #C8E6C9;
  --eco-secondary: #8BC34A;
  --eco-secondary-dark: #689F38;
  --eco-accent: #009688;
  --eco-text: #212121;
  --eco-text-light: #757575;
  --eco-divider: #BDBDBD;
  --eco-background: #f8f9fa;
  --eco-card: #ffffff;
}

/* ─── Base ────────────────────────────────────────────────── */
body {
  background-color: var(--eco-background);
  color: var(--eco-text);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
}

/* ─── Header ──────────────────────────────────────────────── */
.eco-header {
  margin-bottom: 2rem;
}

.eco-header h1 {
  color: var(--eco-primary-dark);
  font-weight: 600;
}

.eco-leaf-divider {
  text-align: center;
  margin: 1rem 0;
  color: var(--eco-secondary);
  font-size: 1.5rem;
  position: relative;
}

.eco-leaf-divider i {
  background-color: var(--eco-background);
  padding: 0 15px;
  position: relative;
  z-index: 1;
}

.eco-leaf-divider::before {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  background-color: var(--eco-divider);
  position: absolute;
  top: 50%;
  left: 0;
  z-index: 0;
}

/* ─── Cards ───────────────────────────────────────────────── */
.eco-form .card,
.card {
  border: none;
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.3s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23a5d6a7' fill-opacity='0.1' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E");
  background-color: var(--eco-card);
}

.eco-form .card:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.bg-eco-light {
  background-color: var(--eco-primary-light) !important;
  color: var(--eco-primary-dark);
  border: none;
}

/* ─── Form Elements ───────────────────────────────────────── */
.eco-form .form-label {
  font-weight: 500;
  color: var(--eco-text);
}

.eco-form .form-control,
.eco-form .form-select {
  border-radius: 6px;
  border: 1px solid var(--eco-divider);
  padding: 0.6rem 0.75rem;
  transition: all 0.3s ease;
}

.eco-form .form-control:focus,
.eco-form .form-select:focus {
  border-color: var(--eco-secondary);
  box-shadow: 0 0 0 0.25rem rgba(139, 195, 74, 0.25);
}

.form-control,
.form-select {
  margin-bottom: 0.5rem;
}

/* ─── Buttons ─────────────────────────────────────────────── */
.btn-eco-primary {
  background-color: var(--eco-primary);
  border-color: var(--eco-primary);
  color: white;
  transition: all 0.3s ease;
}

.btn-eco-primary:hover {
  background-color: var(--eco-primary-dark);
  border-color: var(--eco-primary-dark);
  color: white;
}

.btn-eco-secondary {
  background-color: var(--eco-secondary);
  border-color: var(--eco-secondary);
  color: white;
  transition: all 0.3s ease;
}

.btn-eco-secondary:hover {
  background-color: var(--eco-secondary-dark);
  border-color: var(--eco-secondary-dark);
  color: white;
}

/* ─── Tables ──────────────────────────────────────────────── */
.table {
  border-collapse: separate;
  border-spacing: 0;
}

.table thead th {
  background-color: var(--eco-primary-light);
  color: var(--eco-primary-dark);
  font-weight: 600;
  border: none;
}

.table tbody tr {
  transition: all 0.2s ease;
}

.table tbody tr:hover {
  background-color: rgba(200, 230, 201, 0.2);
}

#itemsTable input {
  font-size: 0.9rem;
}

/* ─── Loader ──────────────────────────────────────────────── */
#loader {
  color: var(--eco-primary);
  transition: all 0.3s ease;
}

/* ─── Invoice Result ──────────────────────────────────────── */
#invoice-link-table {
  transition: all 0.3s ease;
}

.copy-btn {
  cursor: pointer;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  color: var(--eco-primary-dark) !important;
}

.copy-btn.copied {
  color: var(--eco-primary) !important;
}

/* ─── Confirmation Modal ──────────────────────────────────── */
.confirm-summary-item {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--eco-divider);
}

.confirm-summary-item:last-child {
  border-bottom: none;
  font-weight: 600;
}

/* ─── Toast Notifications ─────────────────────────────────── */
.toast-container {
  z-index: 9999;
}

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .container {
    padding-left: 10px;
    padding-right: 10px;
  }

  .table-responsive {
    border-radius: 8px;
    overflow-x: auto;
  }

  .eco-form .card-body {
    padding: 1rem;
  }

  .btn-eco-primary,
  .btn-eco-secondary {
    width: 100%;
    margin-bottom: 0.5rem;
  }
}
