/**
 * Invoice Upload Styles
 *
 * Styles for the invoice upload interface
 */

/* Upload Wrapper */
.obramat-invoice-upload-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

/* Help Section */
.obramat-invoice-upload-help {
  background: #f0f6fc;
  border-left: 4px solid #2271b1;
  padding: 15px 20px;
  border-radius: 4px;
}

.obramat-invoice-upload-help p {
  margin: 0;
  color: #1d2327;
}

/* Dropzone */
.obramat-invoice-dropzone {
  border: 2px dashed #c3c4c7;
  border-radius: 8px;
  padding: 60px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #f9f9f9;
  position: relative;
}

.obramat-invoice-dropzone:hover {
  border-color: #2271b1;
  background: #f0f6fc;
}

.obramat-invoice-dropzone.obramat-dropzone-active {
  border-color: #2271b1;
  background: #e6f2ff;
  border-style: solid;
}

.obramat-invoice-dropzone i.material-icons-outlined {
  color: #646970;
  display: block;
  margin: 0 auto;
}

.obramat-invoice-dropzone h3 {
  color: #1d2327;
  font-size: 1.3em;
  margin: 0;
}

.obramat-invoice-dropzone p {
  margin: 5px 0 0 0;
}

/* Upload List */
.obramat-invoice-upload-list h4 {
  margin: 0 0 15px 0;
  color: #1d2327;
}

/* File Item */
.obramat-invoice-file-item {
  background: #fff;
  border: 1px solid #dcdcde;
  border-radius: 4px;
  padding: 15px;
  margin-bottom: 10px;
  transition: all 0.3s ease;
}

.obramat-invoice-file-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.obramat-file-icon {
  font-size: 32px;
  color: #646970;
  flex-shrink: 0;
}

.obramat-file-details {
  flex: 1;
  min-width: 0;
}

.obramat-file-name {
  display: block;
  font-weight: 500;
  color: #1d2327;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.obramat-file-size {
  display: block;
  font-size: 0.9em;
  color: #646970;
  margin-top: 2px;
}

.obramat-file-remove {
  background: transparent;
  border: none;
  padding: 5px;
  cursor: pointer;
  color: #646970;
  transition: color 0.2s;
  flex-shrink: 0;
}

.obramat-file-remove:hover {
  color: #d63638;
}

.obramat-btn-icon {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s;
}

.obramat-btn-icon:hover {
  background: #f0f0f1;
}

/* File Status */
.obramat-file-status {
  margin-top: 10px;
  font-size: 0.9em;
}

.obramat-status-text {
  color: #646970;
}

/* Status Colors */
.obramat-file-status-pending {
  background: #f9f9f9;
}

.obramat-file-status-processing {
  background: #fff3cd;
  border-color: #ffecb5;
}

.obramat-file-status-processing .obramat-status-text {
  color: #997404;
  font-weight: 500;
}

.obramat-file-status-success {
  background: #d4edda;
  border-color: #c3e6cb;
}

.obramat-file-status-success .obramat-file-icon {
  color: #155724;
}

.obramat-file-status-success .obramat-status-text {
  color: #155724;
  font-weight: 500;
}

.obramat-file-status-error {
  background: #f8d7da;
  border-color: #f5c6cb;
}

.obramat-file-status-error .obramat-file-icon {
  color: #721c24;
}

.obramat-file-status-error .obramat-status-text {
  color: #721c24;
  font-weight: 500;
}

/* Progress Bar */
.obramat-progress-bar {
  height: 4px;
  background: #f0f0f1;
  border-radius: 2px;
  overflow: hidden;
  margin-top: 10px;
}

.obramat-progress-bar-fill {
  height: 100%;
  background: #2271b1;
  transition: width 0.3s ease;
  border-radius: 2px;
}

/* Upload Actions */
.obramat-invoice-upload-actions {
  padding: 20px 0;
}

/* Preview Popup */
#obramat-popup-invoice-preview .obramat-popup-content {
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
}

#obramat-popup-invoice-preview h3 {
  margin: 0 0 20px 0;
  color: #1d2327;
}

#obramat-popup-invoice-preview h4 {
  margin: 20px 0 15px 0;
  padding-top: 20px;
  border-top: 1px solid #dcdcde;
  color: #1d2327;
}

.obramat-form-row {
  margin-bottom: 20px;
}

.obramat-form-row label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #1d2327;
}

.obramat-form-row input,
.obramat-form-row select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #dcdcde;
  border-radius: 4px;
  font-size: 14px;
}

.obramat-form-row input:focus,
.obramat-form-row select:focus {
  outline: none;
  border-color: #2271b1;
  box-shadow: 0 0 0 1px #2271b1;
}

/* Products Table */
.obramat-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.obramat-table thead {
  background: #f9f9f9;
}

.obramat-table th {
  text-align: left;
  padding: 12px;
  font-weight: 600;
  color: #1d2327;
  border-bottom: 2px solid #dcdcde;
}

.obramat-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f0f0f1;
}

.obramat-table td input {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid #dcdcde;
  border-radius: 3px;
  font-size: 13px;
}

.obramat-table td input:focus {
  outline: none;
  border-color: #2271b1;
}

.obramat-table td input[readonly] {
  background: #f6f7f7;
  color: #646970;
}

/* Responsive */
@media (max-width: 768px) {
  .obramat-invoice-upload-wrapper {
    padding: 15px;
  }

  .obramat-invoice-dropzone {
    padding: 40px 15px;
  }

  .obramat-invoice-dropzone h3 {
    font-size: 1.1em;
  }

  #obramat-popup-invoice-preview .obramat-popup-content {
    width: 95%;
    margin: 20px auto;
  }

  .obramat-table {
    font-size: 0.9em;
  }

  .obramat-table th,
  .obramat-table td {
    padding: 8px;
  }
}

/* Popup overlay fix */
.obramat-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.obramat-popup-content {
  position: relative;
  z-index: 1000;
  background: #fff;
  border-radius: 8px;
  padding: 30px;
  margin: 50px auto;
}

.obramat-popup-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 24px;
  color: #646970;
  cursor: pointer;
  padding: 5px;
  line-height: 1;
  transition: color 0.2s;
}

.obramat-popup-close:hover {
  color: #1d2327;
}

/* List unstyled */
.obramat-list-unstyled {
  list-style: none;
  margin: 0;
  padding: 0;
}
