/**
 * استایل‌های بخش عمومی پلاگین
 */

/* استایل‌های عمومی */
.msi-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  direction: rtl;
  text-align: right;
  font-family: "Vazir", tahoma, Arial, sans-serif;
}

.msi-section {
  margin-bottom: 30px;
  padding: 20px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 5px;
}

.msi-section h2 {
  margin-top: 0;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

/* استایل‌های فرم */
.msi-form-row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -10px;
}

.msi-form-field {
  flex: 1;
  min-width: 200px;
  padding: 0 10px;
  margin-bottom: 15px;
}

.msi-form-field label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
}

.msi-form-field input,
.msi-form-field select,
.msi-form-field textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.msi-form-field .description {
  margin-top: 5px;
  color: #666;
  font-style: italic;
  font-size: 12px;
}

/* استایل‌های جدول */
.msi-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.msi-table th,
.msi-table td {
  padding: 10px;
  border: 1px solid #ddd;
  text-align: right;
}

.msi-table th {
  background: #f8f8f8;
  font-weight: 600;
}

/* استایل‌های دکمه */
.msi-button {
  display: inline-block;
  padding: 8px 16px;
  background: #0073aa;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.5;
}

.msi-button:hover {
  background: #005f8b;
  color: #fff;
}

.msi-button-secondary {
  background: #f7f7f7;
  color: #555;
  border: 1px solid #ccc;
}

.msi-button-secondary:hover {
  background: #eee;
  color: #555;
}

/* استایل‌های پیام */
.msi-message {
  padding: 10px 15px;
  margin-bottom: 20px;
  border-radius: 4px;
}

.msi-message-success {
  background: #dff0d8;
  color: #3c763d;
  border: 1px solid #d6e9c6;
}

.msi-message-error {
  background: #f2dede;
  color: #a94442;
  border: 1px solid #ebccd1;
}

.msi-message-info {
  background: #d9edf7;
  color: #31708f;
  border: 1px solid #bce8f1;
}

/* استایل‌های فاکتور */
.msi-invoice {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  background: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.msi-invoice-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.msi-invoice-logo {
  max-width: 200px;
  max-height: 100px;
}

.msi-invoice-info {
  text-align: left;
}

.msi-invoice-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 10px;
}

.msi-invoice-number {
  font-size: 16px;
  margin-bottom: 5px;
}

.msi-invoice-date {
  font-size: 14px;
  color: #666;
}

.msi-invoice-parties {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

.msi-invoice-seller,
.msi-invoice-buyer {
  flex: 1;
}

.msi-invoice-seller h3,
.msi-invoice-buyer h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 16px;
}

.msi-invoice-items {
  margin-bottom: 20px;
}

.msi-invoice-totals {
  width: 300px;
  margin-right: auto;
  margin-left: 0;
}

.msi-invoice-totals td {
  padding: 5px 10px;
}

.msi-invoice-totals td:last-child {
  text-align: left;
  font-weight: 600;
}

.msi-invoice-totals tr.msi-total-row td {
  border-top: 2px solid #ddd;
  font-size: 16px;
}

.msi-invoice-footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: space-between;
}

.msi-invoice-signature {
  width: 45%;
  text-align: center;
}

.msi-invoice-signature h4 {
  margin-top: 0;
  margin-bottom: 40px;
}

.msi-invoice-signature-line {
  border-top: 1px solid #000;
  margin-top: 60px;
}

/* استایل‌های چاپ */
@media print {
  body {
    background: #fff;
  }

  .msi-invoice {
    border: none;
    box-shadow: none;
  }

  .msi-no-print {
    display: none;
  }
}
