/* setting page css start */
.e-invoice-settings .info {
  padding: 10px;
  background-color: white;
}

.e-invoice-settings .help {
  font-size: 10px;
}

.e-invoice-settings .notice-transparent {
  background-color: transparent;
}

.e-invoice-settings table.form-table {
  /* background-color: white; */
}

.e-invoice-settings table.form-table th {
  /* padding-left: 10px; */
}
/* setting page css end */

/* log listing css start */

/* Empty state */
.no-logs-message p {
  text-align: center;
  padding: 40px;
  color: #666;
  line-height: 1.6;
}

.no-logs-message .dashicons-info {
  font-size: 48px;
  opacity: 0.3;
  display: block;
  margin-bottom: 15px;
  width: 100%;
}

/* Controls container */
.log-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding: 10px;
  background: #f9f9f9;
  border-radius: 4px;
  flex-wrap: wrap;
  gap: 10px;
}

/* Filters */
.log-filters {
  display: flex;
  align-items: center;
}

.log-filters label {
  margin-right: 10px;
}

#log-level-filter {
  padding: 4px 28px 4px 8px;
  height: 32px;
  line-height: 1.4;
  vertical-align: middle;
  box-sizing: border-box;
  min-width: 120px;
}

#log-search {
  margin-left: 15px;
  padding: 5px 8px;
  width: 250px;
  height: 32px;
  line-height: 1.4;
  vertical-align: middle;
  box-sizing: border-box;
}

/* Actions */
.log-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.log-count {
  font-size: 13px;
  color: #666;
}

/* Log Badge Styles */
.log-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.log-badge-info {
  background: #e7f3ff;
  color: #0073aa;
  border: 1px solid #bee5eb;
}

.log-badge-warning {
  background: #fff8e1;
  color: #f57c00;
  border: 1px solid #ffe082;
}

.log-badge-error {
  background: #fce4e4;
  color: #dc3232;
  border: 1px solid #f8d7da;
}

/* Log Table Styles */
.log-table-wrapper {
  overflow-x: auto;
}

#log-table {
  margin-top: 0;
  text-align: left !important;
}

#log-table tbody {
  text-align: left !important;
}

#log-table tbody tr {
  text-align: left !important;
}

#log-table th.log-col-timestamp {
  width: 180px;
}

#log-table th.log-col-level {
  width: 100px;
}

/* Override WordPress admin table styles */
.wp-list-table.widefat#log-table td,
.widefat#log-table td,
#log-table.wp-list-table td,
#log-table td {
  vertical-align: middle;
  text-align: left !important;
}

.log-timestamp {
  font-family: "Courier New", monospace;
  font-size: 12px;
  color: #666;
  text-align: left !important;
}

.log-timestamp .dashicons-clock {
  font-size: 14px;
  opacity: 0.5;
}

.wp-list-table.widefat#log-table td.log-message,
.widefat#log-table td.log-message,
#log-table.wp-list-table td.log-message,
#log-table td.log-message,
.log-message {
  text-align: left !important;
  padding: 8px 0 !important;
  text-indent: 0 !important;
}

.wp-list-table.widefat#log-table td.log-message code,
.widefat#log-table td.log-message code,
#log-table.wp-list-table td.log-message code,
#log-table td.log-message code,
.log-message code,
td.log-message code {
  background: #f5f5f5;
  padding: 8px 12px !important;
  border-radius: 3px;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.6;
  box-sizing: border-box;
  text-align: left !important;
  margin: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  float: none !important;
  clear: both !important;
  position: relative !important;
  left: 0 !important;
  text-indent: 0 !important;
}

/* Hidden row style */
tr.log-entry.hidden {
  display: none;
}

/* Responsive */
@media (max-width: 782px) {
  .log-controls {
    flex-direction: column;
    align-items: flex-start !important;
  }

  .log-actions {
    flex-wrap: wrap;
    width: 100%;
  }
  
  #log-search {
    margin-left: 0;
    width: 100%;
  }
}

/* log listing css end */

.o2oeinvoice-panel {
  background-color: transparent;
}
.o2oeinvoice-panel .panel-body {
  border: 1px solid #c3c4c7;
  background-color: white;
}

.consolidated-info-container {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

#consolidated-orders-table-container {
  max-height: 400px;
  overflow-y: auto;
}

.e-invoice-consolidated .alert-fetch-orders {
  margin-top: 20px !important;
}
.e-invoice-consolidated .alert-fetch-orders ul {
  margin-top: 0px;
  margin-bottom: 0px;
  list-style: initial;
  padding: 0px 15px !important;
}
.e-invoice-consolidated .icon-submiting-consolidated {
  margin-left: 10px;
}

.button-subscription {
  background-color: #fec228 !important;
  color: #000 !important;
}
.button .dashicons {
  margin-top: 5px;
}

.badge {
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
}

.alert {
  padding: 5px 10px;
  font-size: 15px;
  border-radius: 4px;
}
.alert-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.d-none {
  display: none;
}
.d-inline-block {
  display: inline-block;
}

.ta-right {
  text-align: right !important;
}

.e-invoice-label .label,
.note-section span.label,
.modal-body .label {
  border-radius: 5px;
  color: white;
  padding: 5px 10px;
}

.reminder {
  margin-top: 25px;
  font-style: italic;
  background-color: #fff0854d;
}

.text-align-left {
  text-align: left !important;
}

.text-align-right {
  text-align: right !important;
}

.tablenav {
  margin-bottom: 10px;
}

.btn-download-pdf {
  margin-left: 10px !important;
}

.e-invoice-settings input[type="submit"] {
  width: initial !important;
}

.e-invoice-settings .einvappmy-input-error {
  border-color: #dc3232 !important;
  box-shadow: 0 0 0 1px #dc3232 !important;
  background-color: #fff5f5 !important;
}

.order-status-checkboxes input[type="checkbox"] {
  max-width: 1rem !important;
}

#edit_total_btn,
#save_total_btn {
  margin-left: 5px;
  cursor: pointer !important;
}

a {
  cursor: pointer !important;
}

input {
  /* width: 80% !important; */
}

.order-details {
  display: none;
  background-color: #f9f9f9;
  padding: 10px;
  border-top: 1px solid #ddd;
}

.order-details.active {
  display: table-row;
}

.order-details td {
  padding: 10px;
}

.order-details .order-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

tr.clickable {
  cursor: pointer;
}

tr.clickable:hover {
  background-color: #f5f5f5;
}

.order-details .order-link {
  display: block;
}

.order-details td {
  vertical-align: top !important;
}

.swal2-container {
  z-index: 99999;
}

.modal-title {
  border-bottom: 1px solid rgb(0, 0, 0, 0.1) !important;
  padding: 15px;
  text-align: left;
  font-size: 1.2em !important;
}

.modal-body {
  text-align: left !important;
  padding: 15px;
}

.modal-body .status p {
  margin-bottom: 5px;
  font-size: 15px;
}

.modal-body .status span {
  min-width: 130px;
  display: inline-block;
  margin-right: 5px;
}

.modal-body .status span:not(.waiting):after {
  content: ":";
  float: right;
}

.modal-body em {
  background: #fff0854d;
}

.modal-footer {
  text-align: center;
  margin-top: 0px;
}

.modal-footer a {
  display: block;
}

.close {
  position: absolute;
  top: 15px;
  right: 15px;
  opacity: 1;
}

.close span {
  color: #ff8400 !important;
}

/* E-invoice link wrapper styles */
.einvoice-link-wrapper {
  display: flex;
  align-items: center;
  gap: 5px;
}

.einvoice-link-wrapper .einvoice-link-input {
  flex: 1;
  margin: 0;
}

.einvoice-link-wrapper .einvoice-link-copy {
  height: 30px;
  width: 30px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  margin: 0;
  vertical-align: middle;
}

.einvoice-link-wrapper .einvoice-link-copy .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
  line-height: 16px;
  display: inline-block;
  vertical-align: middle;
  margin: 0;
  padding: 0;
}

/* PDF icon button styles */
.button-small .dashicons-pdf {
  font-size: 16px;
  width: 16px;
  height: 16px;
  line-height: 16px;
  vertical-align: middle;
  margin: 0;
  padding: 0;
}

/* All button icon styles - ensure proper alignment */
.button-small .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
  line-height: 1;
  vertical-align: middle;
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.button-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  min-width: 32px;
  min-height: 32px;
}

/* PDF button wrapper with tooltip */
.pdf-button-wrapper {
  position: relative;
  display: inline-block;
  margin-right: 4px;
  margin-bottom: 4px;
  vertical-align: middle;
}

.pdf-tooltip {
  visibility: hidden;
  opacity: 0;
  background-color: #2c3338;
  color: #fff;
  text-align: center;
  border-radius: 4px;
  padding: 6px 10px;
  position: absolute;
  z-index: 1000;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 12px;
  transition: opacity 0.3s, visibility 0.3s;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.pdf-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #2c3338 transparent transparent transparent;
}

.pdf-button-wrapper:hover .pdf-tooltip {
  visibility: visible;
  opacity: 1;
}

/* Danger/Delete button styles */
.button-link-delete {
  background-color: #dc3232 !important;
  border-color: #dc3232 !important;
  color: #fff !important;
}

.button-link-delete:hover {
  background-color: #a00 !important;
  border-color: #a00 !important;
  color: #fff !important;
}

.button-link-delete .dashicons {
  color: #fff !important;
}

/* Action buttons container - for responsive layout */
.ta-right {
  white-space: normal;
}

/* Responsive styles for action buttons */
@media (max-width: 782px) {
  .pdf-button-wrapper {
    margin-right: 6px;
    margin-bottom: 6px;
  }
  
  .button-small {
    min-width: 36px;
    min-height: 36px;
    padding: 6px 10px;
  }
  
  .button-small .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
  }
  
  /* Allow buttons to wrap on small screens */
  .ta-right {
    text-align: right !important;
    line-height: 1.4;
  }
}

@media (max-width: 600px) {
  .pdf-button-wrapper {
    margin-right: 4px;
    margin-bottom: 4px;
  }
}

/* Success message for copy action */
.einvoice-copy-success-message {
  position: absolute;
  background: #46b450;
  color: white;
  padding: 6px 12px;
  border-radius: 3px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  animation: fadeInOut 2s ease-in-out;
}

@keyframes fadeInOut {
  0% {
    opacity: 0;
    transform: translateY(-5px);
  }
  15% {
    opacity: 1;
    transform: translateY(0);
  }
  85% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-5px);
  }
}
