/**
 * @author    SWM
 * @copyright 2025 SWM
 * @license   https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License v2.0 or later
 */

.tdbinpack-modal-backdrop {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100000;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s ease-out;
}

.tdbinpack-modal-backdrop.show {
  opacity: 1;
}

.tdbinpack-modal-dialog {
  width: 489px;
  max-width: 95%;
  transform: scale(0.7);
  transition: transform 0.15s ease-out;
  pointer-events: auto;
}

.tdbinpack-modal-backdrop.show .tdbinpack-modal-dialog {
  transform: scale(1);
}

.tdbinpack-modal-content {
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  min-height: 248px;
  display: flex;
  flex-direction: column;
}

.tdbinpack-modal-header {
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.tdbinpack-modal-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #23282d;
}

.tdbinpack-modal-close {
  background: transparent;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tdbinpack-modal-close:hover {
  color: #000;
}

.tdbinpack-modal-body {
  padding: 1.5rem;
  flex: 1;
  font-size: 15px;
  color: #23282d;
  line-height: 1.6;
  overflow-y: auto;
}

.tdbinpack-modal-body p {
  margin: 0;
}

.tdbinpack-modal-body p:first-child {
  font-size: 16px;
}

.tdbinpack-modal-footer {
  padding: 1rem 1.5rem 1.25rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-shrink: 0;
}

.tdbinpack-modal-footer .button {
  min-width: 100px;
  padding: 8px 20px;
  font-size: 14px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid;
  text-decoration: none;
  display: inline-block;
  line-height: 1.4;
}

.tdbinpack-modal-footer .button-secondary {
  color: #555;
  background: #f7f7f7;
  border-color: #ccc;
}

.tdbinpack-modal-footer .button-secondary:hover {
  background: #f3f3f3;
  border-color: #999;
  color: #333;
}

.tdbinpack-modal-footer .button-primary {
  color: #fff;
  background: #2271b1;
  border-color: #2271b1;
}

.tdbinpack-modal-footer .button-primary:hover {
  background: #135e96;
  border-color: #135e96;
  color: #fff;
}

.tdbinpack-modal-footer .button-primary:focus {
  outline: none;
  box-shadow: 0 0 0 2px #2271b1;
}

.tdbinpack-modal-footer .button-secondary:focus {
  outline: none;
  box-shadow: none;
}

.tdbinpack-modal-close:focus {
  outline: 2px solid #2271b1;
  outline-offset: 2px;
}

body.tdbinpack-modal-open {
  overflow: hidden;
}
