/* admin.css — lightweight admin UI for Jalpi Login and Notifications */

/* Layout & Cards */
.jalpi-ln-wrap .jalpi-ln-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 24px;
  margin: 0 0 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
div#jalpi_ln_flow_form_status {
    color: red;
    font-weight: 500;
}
.jalpi-ln-wrap .jalpi-ln-card h2 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 18px;
  font-weight: 600;
  color: #1d2327;
}

/* Dashboard Grid */
.jalpi-ln-dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 1200px) {
  .jalpi-ln-dashboard-grid { 
    grid-template-columns: 1fr; 
  }
}

/* Connection Status Card */
.jalpi-ln-status-card {
  grid-column: span 2;
}

.jalpi-ln-connection-status {
  margin-bottom: 20px;
}

.jalpi-ln-status-indicator {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.jalpi-ln-status-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  animation: pulse 2s infinite;
}

.jalpi-ln-status-dot.jalpi-ln-status-checking {
  background: #f0b429;
}

.jalpi-ln-status-dot.jalpi-ln-status-connected {
  background: #46b450;
  animation: none;
}

.jalpi-ln-status-dot.jalpi-ln-status-error {
  background: #dc3232;
  animation: none;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.jalpi-ln-status-text {
  font-weight: 600;
  font-size: 16px;
  color: #1d2327;
}

.jalpi-ln-status-message {
  margin: 0 0 15px;
  padding: 12px;
  background: #f0f0f1;
  border-radius: 5px;
  font-size: 14px;
}

.jalpi-ln-connection-details {
  margin-top: 20px;
}

.jalpi-ln-info-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

.jalpi-ln-info-table th {
  text-align: left;
  padding: 10px;
  background: #f6f7f7;
  font-weight: 600;
  width: 40%;
}

.jalpi-ln-info-table td {
  padding: 10px;
  border-top: 1px solid #e5e5e5;
}

.jalpi-ln-not-configured {
  text-align: center;
  padding: 40px 20px;
}

.jalpi-ln-not-configured .dashicons {
  font-size: 48px;
  width: 48px;
  height: 48px;
  color: #f0b429;
  margin-bottom: 15px;
}

/* Shortcode Items */
.jalpi-ln-shortcode-item {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e5e5e5;
}

.jalpi-ln-shortcode-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.jalpi-ln-shortcode-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 14px;
}

.jalpi-ln-shortcode-label .dashicons {
  color: #2271b1;
}

.jalpi-ln-shortcode-box {
  display: flex;
  gap: 8px;
}

.jalpi-ln-shortcode-box input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #f6f7f7;
  font-family: 'Courier New', monospace;
  font-size: 13px;
}

.jalpi-ln-copy-btn {
  display: flex;
  align-items: center;
  gap: 5px;
}

.jalpi-ln-copy-btn .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

/* Quick Links */
.jalpi-ln-quick-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.jalpi-ln-quick-links li {
  margin-bottom: 12px;
}

.jalpi-ln-quick-links li:last-child {
  margin-bottom: 0;
}

.jalpi-ln-quick-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #f6f7f7;
  border-radius: 5px;
  text-decoration: none;
  color: #1d2327;
  transition: background 0.2s;
}

.jalpi-ln-quick-links a:hover {
  background: #e5e5e5;
}

.jalpi-ln-quick-links .dashicons {
  color: #2271b1;
}

/* Tables */
.jalpi-ln-wrap table.widefat .jalpi-ln-field {
  font-weight: 600;
}

.jalpi-ln-wrap .widefat.striped tbody tr:hover {
  background: #f9f9f9;
}

/* Badges */
.jalpi-ln-badge {
  display: inline-block;
  padding: 2px 6px;
  border: 1px solid #ccd0d4;
  border-radius: 3px;
  background: #fff;
  font-size: 12px;
  line-height: 1.2;
}
.jalpi-ln-badge--on {
  border-color: #46b450;
  color: #007017;
}
.jalpi-ln-badge--off {
  border-color: #d63638;
  color: #8a2426;
}

/* Shortcode copy box */
.jalpi-ln-sc-box {
  display: flex;
  align-items: center;
  gap: 8px;
}
.jalpi-ln-sc-box input[type="text"] {
  width: 260px;
}

/* Test API */
.jalpi-ln-test-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.jalpi-ln-test-row input[type="text"],
.jalpi-ln-test-row input[type="search"] {
  flex: 1;
}
.jalpi-ln-inline-status {
  margin-left: 6px;
  font-size: 12.5px;
  color: #50575e;
}

/* Templates page */
.jalpi-ln-pre {
  background: #f6f7f7;
  border: 1px solid #e2e2e2;
  padding: 8px;
  border-radius: 4px;
  white-space: pre-wrap;
}
.jalpi-ln-tpl-details td {
  background: #fbfbfb;
}
.jalpi-ln-tpl-row { cursor: pointer; }

/* Flows page */
.jalpi-ln-flows-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

/* Modal */
.jalpi-ln-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 100000;
  display: none; /* toggled via JS */
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.jalpi-ln-modal__dialog {
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e2e2e2;
  max-width: 860px;
  width: 100%;
  box-shadow: 0 12px 30px rgba(0,0,0,.12);
  overflow: hidden;
}
.jalpi-ln-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
}
.jalpi-ln-modal__title {
  margin: 0;
}
.jalpi-ln-modal__close {
  background: none;
  border: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.jalpi-ln-modal__body { padding: 16px; }
.jalpi-ln-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

/* Toast (optional, used by admin.js) */
.jalpi-ln-toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: -60px;
  background: #1d2327;
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  opacity: 0;
  transition: all .25s ease;
  z-index: 100001;
}
.jalpi-ln-toast.show {
  bottom: 24px;
  opacity: 1;
}



.jalpi-ln-wrap .jalpi-ln-card {
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  padding: 16px 16px 8px;
  margin: 16px 0;
}

.jalpi-ln-wrap .form-table th {
  width: 280px;
}

#jalpi-ln-test-result {
  font-weight: 600;
}

/* OTP Settings Form Styling */
.jalpi-ln-form-actions {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e1e1e1;
    display: flex;
    gap: 10px;
    align-items: center;
}

.jalpi-ln-form-actions .button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

#jalpi-ln-otp-save-status {
    font-size: 13px;
    font-weight: 500;
}

#jalpi-ln-otp-save-status .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    margin-right: 4px;
    vertical-align: middle;
}

/* Loading animation for save button */
#jalpi-ln-save-otp-settings:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#jalpi-ln-save-otp-settings:disabled .dashicons {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

