/* 1. Container & General Resets */
#dynamic-commission-form-wrapper {
  max-width: 1280px;             /* Desktop max width */
  margin: 50px auto;             /* Center on page */
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: #333333;
  box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
}

#dynamic-commission-form {
  margin: 0;
  padding: 0;
}

/* 2. Header Bar */
.dcf-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  border-bottom: 1px solid #e1e5e9;
}

.dcf-header-left {
  display: flex;
  align-items: center;
}

.dcf-header-left img {
  height: 32px;
  width: 32px;
  object-fit: contain;
  margin-right: 12px;
}

.dcf-header-left .dcf-title {
  font-size: 20px;
  font-weight: 600;
  color: #009688;
}

.dcf-header-right .dcf-pdf-btn {
  background-color: #009688;
  color: #ffffff;
  border: none;
  padding: 5px 25px;
  margin: 0px 0px;
  font-size: 15px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
}

.dcf-header-right .dcf-pdf-btn:hover {
  background-color: #00796b;
}

/* 3. Section Styling (common) */
.dcf-section {
  padding: 0px 10px;
}

.dcf-section .dcf-section-title {
  font-size: 20px;
  color: #009688;
  margin: 10px 0px;
  font-weight: 600;
}

.dcf-agent-fields {
  display: flex;
  gap: 24px;
}

.dcf-agent-fields .dcf-input-group {
  flex: 1 1 calc(33.333% - 16px);
  min-width: 200px;
}

.dcf-agent-fields .dcf-input-group label {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
  color: #555555;
}

.dcf-agent-fields .dcf-input-group input[type="text"] {
  width: 100%;
  height: 35px;
  padding: 10px 12px;
  font-size: 15px;
  border: 1px solid #cccccc;
  border-radius: 4px;
  background: #ffffff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.dcf-agent-fields .dcf-input-group input[type="text"]:focus {
  border-color: #009688;
  box-shadow: 0 0 0 2px rgba(0,150,136,0.15);
  outline: none;
}

/* Date sits below the three inputs, full width up to 1/3 of container */
.dcf-agent-date-container {
  margin-top: 0px;
  max-width: 32%; /* On desktop, date takes half width (adjustable) */
}

.dcf-agent-date-container label {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
  color: #555555;
}

.dcf-date-wrapper {
  position: relative;
}
 
 .dcf-date-wrapper input[type="date"] {
  font-size: 15px;
  height: 35px;
  border: 1px solid #cccccc;
  border-radius: 4px;
  background: #ffffff;
  transition: border-color 0.2s, box-shadow 0.2s;
}  

.dcf-date-wrapper input[type="date"]:focus {
  border-color: #009688;
  box-shadow: 0 0 0 2px rgba(0,150,136,0.15);
  outline: none;
} 

.dcf-calendar-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: #777777;
  pointer-events: none;
}

/* 5. Tranzacții Section (Desktop Only) */
.dcf-trans-container {
  /* white background from wrapper; top border handled by .dcf-section + .dcf-section */
  position: relative;
  margin-top: 16px;
}

/* “+ Adaugă Rând” button floated right */
#dcf_add_row {
  background-color: #009688;
  color: #ffffff;
  border: none;
  padding: 5px 25px;
  font-size: 15px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
  float: right;
  margin: -35px 0px 0px 0px;
}

#dcf_add_row:hover {
  background-color: #00796b;
}

/* Clear float after button */
.dcf-trans-container::after {
  content: "";
  display: table;
  clear: both;
}

/* Transactions Table: full desktop width up to container */
.dcf-trans-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}
.dcf-trans-table thead {
  background: #457e6d21;
}

.dcf-trans-table thead th {
  color: #333333;
  font-weight: 600;
  text-align: left;
  padding: 5px 10px;
  border: 1px solid #6480773b;
}

.dcf-trans-table td {
  vertical-align: middle;
  padding: 10px 3px;
}

/* Inputs in table */
 .dcf-trans-table td input[type="text"],
.dcf-trans-table td input[type="date"],
.dcf-trans-table td input[type="number"] {
  width: 100%;
  height: 35px;
  padding: 8px 10px;
  font-size: 14px;
  border: 1px solid #cccccc;
  border-radius: 4px;
  background: #ffffff;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.dcf-trans-table td input[type="text"]:focus,
.dcf-trans-table td input[type="date"]:focus,
.dcf-trans-table td input[type="number"]:focus {
  border-color: #009688;
  box-shadow: 0 0 0 2px rgba(0,150,136,0.15);
  outline: none;
}

/* Commission is plain text */
.dcf-trans-table td .dcf-commission {
  font-weight: 500;
  color: #333333;
}

/* Delete row button (trash icon) */
.dcf-trans-table td .dcf-delete-row {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #e74c3c;
  transition: color 0.2s;
  margin: 0px 0px -20px 20px;
}

.dcf-trans-table td .dcf-delete-row:hover {
  color: #c0392b;
}

/* Total row at bottom */
.dcf-trans-table tfoot tr td {
  padding: 12px 8px;
  font-weight: 600;
  font-size: 15px;
  border-top: 1px solid #e1e5e9;
}

.dcf-trans-table tfoot tr .dcf-total-comision {
  color: #000000;
}


/* Left side: logo + two-line title */
/* reset any old “all spans = block” rule */
.pdf-header-left  {
  display: inline;
}

.pdf-header-left img{
  height: 32px;
}

/* style the main title */
.pdf-header-left .title-text strong.title {
  font-size: 18px;
  font-weight: bold;
}
.title-text {
    display: inline-flex;
    flex-direction: column;
    font-size: 8px;
    margin-left: 10px;
    line-height: 10px;
}
.title-p {
    font-size: 10px;
    margin-top: 5px;
    line-height: 5px;
}

/* color just the “LAB” piece */
.pdf-header-left .title-text strong.title span, .title-p{
  color: #009688;
}

/* 3. Mobile Styles */
@media (max-width: 1020px) {
  /* 1) Stack the Agent fields vertically */
  .dcf-agent-fields {
    display: flex;
    flex-direction: column;
  }
  .dcf-agent-fields .dcf-input-group {
    width: 100%;
    margin-bottom: 12px;
  }
  .dcf-agent-date-container {
    margin-bottom: 12px;
  }

  /* 2) Make the transactions‐table container scroll horizontally */
  .dcf-trans-container-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* smooth scrolling on iOS */
  }
  .dcf-trans-table {
    width: 100%;
    min-width: 600px; /* adjust this so that all columns fit and only mobile view scrolls */
  }
  .dcf-agent-date-container {
  margin-top: 10px;
  max-width: 100%; /* On desktop, date takes half width (adjustable) */
}
.dcf-title {
  font-size: 15x;
}
.dcf-header-bar {
    flex-wrap: wrap;
}
.pdf-header-left .title {
    margin-bottom: 0px;
}

.title-p {
    margin-bottom: 20px;
}

}
