/* modal.css - shared modal styling */

.modal {
  display: none;
  position: fixed;
  z-index: 2000 !important;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

.modal.is-visible {
  align-items: center;
  display: flex;
  justify-content: center;
  padding: 18px;
}

.modal-content {
  background-color: #fefefe;
  margin: 5% auto;
  padding: 20px;
  border: 2px solid #0b2e59;
  width: 90%;
  max-width: 500px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 2001 !important;
  position: relative;
}

.modal-content .form-group {
  position: relative;
}

.close {
  background: transparent !important;
  border: 0 !important;
  color: #aaa;
  position: absolute;
  right: 16px;
  top: 16px;
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  margin: 0;
  padding: 0;
  cursor: pointer !important;
  transition: color 0.2s;
}

.close:hover {
  color: #0b2e59;
  cursor: pointer !important;
}

.modal-content label {
  display: block;
  margin-bottom: 10px;
  font-weight: bold;
  position: relative;
  z-index: 1;
  background-color: #fefefe;
  padding-right: 10px;
  width: fit-content;
}

.modal-content input,
.modal-content select {
  width: 100% !important;
  padding: 8px;
  margin: 4px 0 12px 0;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #f9f9f9;
  box-sizing: border-box;
  display: block;
}

.modal-status {
  background: #edf5ff;
  border: 1px solid #bad7f5;
  border-radius: 8px;
  color: #0b2e59;
  font-size: 0.9rem;
  font-weight: 700;
  margin: 8px 0 12px;
  padding: 10px 12px;
}

.modal-status[data-tone="success"] {
  background: #e5f6ef;
  border-color: #b7e4d0;
  color: #176b4d;
}

.modal-status[data-tone="warning"] {
  background: #fff4d8;
  border-color: #f0d28a;
  color: #8a5a08;
}

.modal-status[data-tone="danger"] {
  background: #fde8e8;
  border-color: #f0b8b8;
  color: #9b2c2c;
}

.modal-status[hidden] {
  display: none;
}

#addEmployeeBtn {
  margin-top: 4px !important;
  margin-bottom: 28px !important;
  width: 100% !important;
}

.modal-subtext {
  font-size: 0.9rem;
  font-style: italic;
  color: #333;
  margin-top: -12px;
  margin-bottom: 16px;
  text-align: left;
}

.modal-content button {
  background-color: #0b2e59;
  color: white;
  padding: 8px 16px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  font-size: 0.9rem;
  margin-right: 8px;
  margin-top: 8px;
}

.modal-content button:hover {
  background-color: #0d3a75;
}

#ticketSuggestions {
  position: absolute;
  z-index: 2002;
  background-color: white;
  border: 1px solid #ccc;
  border-radius: 4px;
  max-height: 200px;
  overflow-y: auto;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  margin-top: 2px;
  width: 100%;
  left: 0;
}

/* Upgrade modal specific styles */
#upgradeRedirect {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 10px;
  background-color: #0b2e59;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  font-size: 0.95rem;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.3s;
}

#upgradeRedirect:hover {
  background-color: #0d3a75;
}

#upgradePlanModal .modal-content {
  text-align: center;
}

.upgrade-plan-content {
  max-width: 760px;
  text-align: left;
}

.upgrade-plan-content h3 {
  margin: 0 0 8px;
}

.upgrade-modal-copy {
  color: #4d5c6d;
  margin: 0 0 18px;
}

.upgrade-plan-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  margin-top: 18px;
}

.upgrade-plan-button {
  align-items: flex-start;
  display: grid;
  gap: 5px;
  justify-items: start;
  min-height: 104px;
  padding: 14px !important;
  text-align: left;
  width: 100%;
}

.upgrade-plan-name,
.upgrade-plan-limit {
  font-size: 0.82rem;
}

.upgrade-plan-price {
  font-size: 1.18rem;
}

.upgrade-contact {
  margin: 16px 0 0;
  text-align: center;
}

.upgrade-spinner {
  align-items: center;
  color: #4d5c6d;
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 16px;
}

.upgrade-spinner[hidden] {
  display: none;
}

.upgrade-spinner-ring {
  animation: spin 1s linear infinite;
  border: 4px solid rgba(13, 44, 84, 0.18);
  border-radius: 999px;
  border-top-color: #0b2e59;
  height: 24px;
  width: 24px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

body[data-dashboard-theme="executive-navy"] .upgrade-plan-content {
  background: #0f2437;
  border-color: rgba(203, 220, 236, 0.34);
  color: #f7fbff;
}

body[data-dashboard-theme="executive-navy"] .modal-status {
  background: rgba(75, 163, 255, 0.12);
  border-color: rgba(75, 163, 255, 0.34);
  color: #d9ecff;
}

body[data-dashboard-theme="executive-navy"] .modal-status[data-tone="success"] {
  background: rgba(47, 199, 161, 0.14);
  border-color: rgba(47, 199, 161, 0.36);
  color: #91f3d9;
}

body[data-dashboard-theme="executive-navy"] .modal-status[data-tone="warning"] {
  background: rgba(244, 201, 93, 0.14);
  border-color: rgba(244, 201, 93, 0.36);
  color: #ffe1a1;
}

body[data-dashboard-theme="executive-navy"] .modal-status[data-tone="danger"] {
  background: rgba(255, 122, 110, 0.14);
  border-color: rgba(255, 122, 110, 0.38);
  color: #ffb5ae;
}

body[data-dashboard-theme="executive-navy"] .modal-content {
  background: #0f2437;
  border-color: rgba(203, 220, 236, 0.38);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.38);
  color: #f7fbff;
}

body[data-dashboard-theme="executive-navy"] .modal-content h2,
body[data-dashboard-theme="executive-navy"] .modal-content h3,
body[data-dashboard-theme="executive-navy"] .modal-content label,
body[data-dashboard-theme="executive-navy"] .modal-content span,
body[data-dashboard-theme="executive-navy"] .modal-content p {
  color: #f4f9ff;
}

body[data-dashboard-theme="executive-navy"] .modal-content label {
  background: transparent;
}

body[data-dashboard-theme="executive-navy"] .modal-subtext,
body[data-dashboard-theme="executive-navy"] .modal-content .form-helper,
body[data-dashboard-theme="executive-navy"] .modal-content small {
  color: #c9d8e8;
}

body[data-dashboard-theme="executive-navy"] .modal-content input,
body[data-dashboard-theme="executive-navy"] .modal-content select,
body[data-dashboard-theme="executive-navy"] .modal-content textarea,
body[data-dashboard-theme="executive-navy"] .modal-content .form-control {
  background: #061421;
  border-color: rgba(203, 220, 236, 0.42);
  color: #f8fbff;
}

body[data-dashboard-theme="executive-navy"] .modal-content input::placeholder,
body[data-dashboard-theme="executive-navy"] .modal-content textarea::placeholder {
  color: #b9cbe0;
  opacity: 1;
}

body[data-dashboard-theme="executive-navy"] .modal-content input:disabled,
body[data-dashboard-theme="executive-navy"] .modal-content select:disabled,
body[data-dashboard-theme="executive-navy"] .modal-content textarea:disabled {
  background: rgba(6, 20, 33, 0.62);
  border-color: rgba(203, 220, 236, 0.24);
  color: #adc1d6;
  opacity: 1;
}

body[data-dashboard-theme="executive-navy"] .modal-content select option,
body[data-dashboard-theme="executive-navy"] .modal-content select optgroup {
  background: #061421;
  color: #f8fbff;
}

body[data-dashboard-theme="executive-navy"] .close {
  color: #dbe8f5;
}

body[data-dashboard-theme="executive-navy"] .close:hover,
body[data-dashboard-theme="executive-navy"] .close:focus-visible {
  color: #ffffff;
}

body[data-dashboard-theme="executive-navy"] #ticketSuggestions,
body[data-dashboard-theme="executive-navy"] .suggestions-list {
  background: #071827;
  border-color: rgba(203, 220, 236, 0.42);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
  color: #f8fbff;
}

body[data-dashboard-theme="executive-navy"] .suggestions-list li {
  color: #f8fbff;
}

body[data-dashboard-theme="executive-navy"] .suggestions-list li:hover,
body[data-dashboard-theme="executive-navy"] .suggestions-list li:focus-visible {
  background: rgba(75, 163, 255, 0.18);
}

body[data-dashboard-theme="executive-navy"] .upgrade-modal-copy,
body[data-dashboard-theme="executive-navy"] .upgrade-spinner {
  color: #9fb2c8;
}

body[data-dashboard-theme="executive-navy"] .upgrade-plan-button {
  background: linear-gradient(135deg, #2fc7a1, #4ba3ff);
  color: #03101c;
}

body[data-dashboard-theme="executive-navy"] .upgrade-contact a {
  color: #91f3d9;
}

body[data-dashboard-theme="executive-navy"] .upgrade-spinner-ring {
  border-color: rgba(247, 251, 255, 0.18);
  border-top-color: #2fc7a1;
}

@media (max-width: 620px) {
  .upgrade-plan-grid {
    grid-template-columns: 1fr;
  }
}
