:root {
  --mk-primary: #314641; /* Dark green accent color */
  --mk-secondary: #f8f3e7;
  --mk-accent: #1a2520; /* Darker green for accents */
  --mk-success: #ffd500; /* Ukrainian yellow for success */
  --mk-error: #f44336;
  --mk-text: #333;
  --mk-text-light: #666;
  --mk-border: #e0e0e0;
  --mk-shadow: 0 4px 20px rgba(49, 70, 65, 0.15);
  --mk-ukraine-blue: #005bbb; /* Ukrainian flag blue */
  --mk-ukraine-yellow: #ffd500; /* Ukrainian flag yellow */
  --mk-background: #ffffff;
  --mk-background-secondary: #f9f9f9;
}

/* Default shortcode button styles - Ukrainian Yellow theme */
.mk-donate-trigger-btn,
.mk-btn-normal,
.mk-btn-large {
  background: var(--mk-ukraine-yellow);
  color: #333;
  border: none;
  border-radius: 30px;
  padding: 12px 24px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(255, 213, 0, 0.3);
  position: relative;
  overflow: hidden;
  display: inline-block;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.4;
  min-width: 120px;
  white-space: nowrap;
}

.mk-btn-large {
  padding: 16px 32px;
  font-size: 16px;
  min-width: 150px;
}

.mk-donate-trigger-btn:hover,
.mk-btn-normal:hover,
.mk-btn-large:hover {
  background: #f0c000;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 213, 0, 0.4);
  color: #222;
  cursor: pointer;
}

/* Width modifier classes for custom button widths */
/* Usage in shortcodes: width="small|medium|large|xl|full|auto" */
/* Examples: 
   [mk_donate_button width="full" text="Support Us"] - Full width button
   [mk_onetime_button width="small" text="Donate"] - Small width button
   [mk_donate_trigger width="xl" text="Monthly Support"] - Extra large button
*/
.mk-btn-full-width {
  width: 100%;
  display: block;
}

.mk-btn-auto-width {
  width: auto;
  min-width: 0;
}

.mk-btn-small-width {
  min-width: 80px;
  padding: 8px 16px;
  font-size: 12px;
}

.mk-btn-medium-width {
  min-width: 120px;
}

.mk-btn-large-width {
  min-width: 200px;
}

.mk-btn-xl-width {
  min-width: 300px;
}

.mk-donate-trigger-btn-custom {
  background: var(--mk-primary);
  color: white;
  border: none;
  border-radius: 30px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(49, 70, 65, 0.3);
  position: relative;
  overflow: hidden;
  display: inline-block;
  text-decoration: none;
  text-align: center;
}

.mk-donate-trigger-btn-custom:hover {
  background: var(--mk-accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(49, 70, 65, 0.4);
}

.mk-donate-trigger-btn:active {
  transform: translateY(-1px);
}

.mk-btn-normal {
  padding: 14px 28px;
  font-size: 16px;
}

.mk-btn-large {
  padding: 20px 40px;
  font-size: 18px;
}

.mk-modal {
  display: none;
  position: fixed;
  z-index: 999999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease;
  pointer-events: auto;
}

.mk-modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  flex-direction: column;
}

.mk-modal-wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  align-self: center;
  position: relative;
}

.mk-modal-content {
  background: var(--mk-background);
  border-radius: 16px;
  width: 100%;
  padding: 0;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 400px;
}

.mk-lang-controls {
  display: flex;
  flex-direction: row;
  gap: 20px;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--mk-border);
}

.mk-lang-select {
  padding: 8px 12px;
  border-radius: 6px;
  border: 2px solid var(--mk-border);
  background: white;
  font-weight: 600;
  font-size: 13px;
  color: var(--mk-primary);
  transition: all 0.3s ease;
  min-width: 70px;
  cursor: pointer;
}

.mk-cancel-link {
  color: var(--mk-primary);
  text-decoration: none;
  font-size: 11px;
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(49, 70, 65, 0.1);
}

.mk-cancel-link:hover {
  color: var(--mk-ukraine-blue);
  background: rgba(0, 91, 187, 0.1);
  text-decoration: underline;
}

.mk-lang-select:focus {
  outline: none;
  border-color: var(--mk-primary);
  box-shadow: 0 0 0 3px rgba(49, 70, 65, 0.1), 0 0 0 6px rgba(0, 91, 187, 0.05);
  background: var(--mk-background);
}

.mk-close {
  position: absolute;
  right: 20px;
  top: 20px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--mk-text-light);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.mk-close:hover {
  background: var(--mk-ukraine-yellow);
  color: var(--mk-text);
  transform: scale(1.1);
}

/* Step 2 compact design */
#mkStep2 {
  padding: 24px 24px 16px;
}

#mkStep2 .mk-step-header {
  margin-bottom: 20px;
}

#mkStep2 .mk-form-group {
  margin-bottom: 16px;
}

#mkStep2 .mk-rules,
#mkStep2 .mk-consent {
  margin: 20px 0 16px;
  padding: 16px;
}

#mkStep2 .mk-beneficiary {
  margin-top: 16px;
  padding: 14px;
  font-size: 12px;
}

#mkStep2 .mk-step-buttons {
  margin-top: 20px;
  gap: 12px;
}

/* Rules link styling */
.mk-rules a {
  color: var(--mk-ukraine-blue) !important;
  font-weight: 700 !important;
  text-decoration: underline !important;
  transition: all 0.3s ease;
}

.mk-rules a:hover {
  color: var(--mk-primary) !important;
  text-decoration: none !important;
}

/* Rules checkbox alignment */
.mk-rules label.mk-checkbox {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
}

.mk-progress {
  display: none;
}

.mk-step-indicator {
  display: none;
}

.mk-step-buttons {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}

/* Clean up duplicate styles in media queries */
@media (max-width: 768px) {
  .mk-progress,
  .mk-step-indicator {
    display: none;
  }
}

@media (max-width: 480px) {
  .mk-progress,
  .mk-step-indicator {
    display: none;
  }
}

.mk-amounts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.mk-amount-btn {
  background: var(--mk-background, #fff);
  border: 2px solid var(--mk-border, #e0e0e0);
  color: var(--mk-primary, #314641);
  padding: 16px 8px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.mk-custom-amount-btn {
  background: var(--mk-background-secondary);
  font-weight: 600;
  font-size: 14px;
  color: var(--mk-text);
}

/* Custom amount container for button/input transformation - always full width */
.mk-custom-amount-container {
  grid-column: 1 / -1;
  display: flex;
  width: 100%;
  margin-top: 10px;
}

.mk-custom-amount-container .mk-custom-amount-btn {
  width: 100%;
  flex: 1;
}

.mk-custom-amount-input {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid var(--mk-border);
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
  background: var(--mk-background);
  color: var(--mk-text);
}

.mk-custom-amount-input:focus {
  outline: none;
  border-color: var(--mk-ukraine-blue);
  box-shadow: 0 0 0 4px rgba(0, 91, 187, 0.1);
}

.mk-custom-amount-input::placeholder {
  color: var(--mk-text-light);
  opacity: 0.7;
}

.mk-amount-btn:hover {
  border-color: var(--mk-ukraine-blue, #005bbb);
  background: var(--mk-background, #fff);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 91, 187, 0.15);
}

.mk-amount-btn.selected {
  background: var(--mk-ukraine-yellow, #ffd500);
  color: var(--mk-text, #333);
  border-color: var(--mk-ukraine-yellow, #ffd500);
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(255, 213, 0, 0.35);
}

/* 4 columns grid layout with custom amount always full width */
@media (max-width: 520px) {
  .mk-amounts .mk-custom-amount-btn {
    grid-column: 1 / -1;
  }
}

@media (max-width: 400px) {
  .mk-amounts .mk-custom-amount-btn {
    grid-column: 1 / -1;
  }
}

.mk-form-group {
  margin-bottom: 24px;
}

.mk-form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--mk-text);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.4;
}

.mk-form-group input {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid var(--mk-border);
  border-radius: 12px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: var(--mk-background);
  box-sizing: border-box;
  font-weight: 400;
}

.mk-form-group input:focus {
  outline: none;
  border-color: var(--mk-ukraine-blue);
  box-shadow: 0 0 0 4px rgba(0, 91, 187, 0.1);
  background: white;
}

.mk-form-group input::placeholder {
  color: var(--mk-text-light);
  opacity: 0.7;
}

.mk-consent {
  margin: 32px 0 24px;
  padding: 24px;
  background: var(--mk-background-secondary);
  border-radius: 16px;
  border: 2px solid rgba(255, 213, 0, 0.2);
  position: relative;
}

.mk-consent::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--mk-ukraine-yellow);
  border-radius: 16px 16px 0 0;
}

.mk-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  cursor: pointer;
  color: var(--mk-text);
  line-height: 1.6;
  font-size: 15px;
}

.mk-checkbox input[type="checkbox"] {
  display: none;
}

.mk-checkmark {
  width: 28px;
  height: 28px;
  border: 2px solid var(--mk-border);
  border-radius: 8px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
  margin-top: 2px;
  position: relative;
}

.mk-checkbox input:checked + .mk-checkmark {
  background: var(--mk-ukraine-blue);
  border-color: var(--mk-ukraine-blue);
  box-shadow: 0 4px 12px rgba(0, 91, 187, 0.3);
}

.mk-checkbox input:checked + .mk-checkmark:after {
  content: "✓";
  color: var(--mk-text);
  font-weight: bold;
}

/* Compact consent checkbox styling (similar to one-time donations) */
.mk-form-group.mk-consent-group {
  margin-top: -12px;
  margin-bottom: 16px;
}

.mk-form-group.mk-consent-group > label.mk-checkbox {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 0;
  color: var(--mk-text-light);
  font-weight: 400;
  font-size: 13px;
  line-height: 1.4;
  white-space: normal;
}

.mk-form-group.mk-consent-group > label.mk-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--mk-ukraine-yellow);
}

.mk-form-group.mk-consent-group > label.mk-checkbox .mk-checkmark {
  width: 16px;
  height: 16px;
  border-radius: 3px;
}

.mk-form-group.mk-consent-group > label.mk-checkbox span:not(.mk-checkmark) {
  font-size: 12px;
}

.mk-btn {
  padding: 18px 28px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  font-size: 16px;
  position: relative;
  overflow: hidden;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Popup trigger button styling */
.mk-popup-trigger-btn {
  padding: 18px 28px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  font-size: 16px;
  position: relative;
  overflow: hidden;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.mk-btn-primary {
  background: var(--mk-primary);
  color: white;
  width: 100%;
  box-shadow: 0 4px 16px rgba(49, 70, 65, 0.2);
  border: 2px solid var(--mk-primary);
}

.mk-btn-primary:hover:not(:disabled) {
  background: var(--mk-accent);
  border-color: var(--mk-accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(49, 70, 65, 0.3);
}

.mk-btn-primary:disabled {
  background: #cccccc !important;
  color: #666666 !important;
  border-color: #cccccc !important;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  opacity: 0.6;
}

/* Pay button (Step 1) – Ukrainian yellow with white uppercase text to match one-time donations */
#mkNextStep2.mk-btn-primary {
  background: var(--mk-ukraine-yellow);
  color: #ffffff;
  border-color: var(--mk-ukraine-yellow);
  text-transform: uppercase;
}

#mkNextStep2.mk-btn-primary:hover:not(:disabled) {
  background: #e6c000;
  border-color: #e6c000;
}

#mkNextStep2.mk-btn-primary:disabled {
  background: #cccccc !important;
  color: #666666 !important;
  border-color: #cccccc !important;
}

.mk-btn-secondary {
  background: var(--mk-background);
  color: var(--mk-primary);
  border: 2px solid var(--mk-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mk-btn-secondary:hover {
  background: var(--mk-background-secondary);
  border-color: var(--mk-primary);
  color: var(--mk-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(49, 70, 65, 0.15);
}

.mk-step-buttons {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}

.mk-loading {
  text-align: center;
  padding: 64px 32px;
}

.mk-spinner {
  width: 64px;
  height: 64px;
  border: 4px solid var(--mk-border);
  border-top: 4px solid var(--mk-ukraine-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 24px;
  box-shadow: 0 4px 12px rgba(0, 91, 187, 0.2);
}

.mk-loading p {
  color: var(--mk-text-light);
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}

.mk-message {
  max-width: 520px;
  margin: 32px auto;
  padding: 32px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.mk-message-icon {
  font-size: 120px;
  margin-bottom: 24px;
  display: block;
}

.mk-message-icon img {
  max-width: 160px;
  max-height: 160px;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
  display: block;
}

.mk-message h3 {
  margin: 0 0 16px 0;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
}

.mk-message p {
  margin: 12px 0;
  font-size: 16px;
  line-height: 1.5;
}

.mk-message small {
  font-size: 14px;
  opacity: 0.8;
  line-height: 1.4;
}

.mk-message .mk-btn {
  margin-top: 24px;
}

.mk-cancel-view {
  display: none !important;
  padding: 32px 32px 16px;
}

.mk-cancel-view.active {
  display: block !important;
  animation: slideIn 0.3s ease;
}

.mk-step {
  display: none;
  padding: 24px 24px 16px;
  max-height: 90vh;
  overflow-y: auto;
}

.mk-step.active {
  display: block;
  animation: slideIn 0.3s ease;
}

#mkStep1:not(.active),
#mkStep2:not(.active),
#mkStep3:not(.active),
#mkStep4:not(.active) {
  display: none !important;
}

.mk-step-header {
  margin-bottom: 16px;
  text-align: center;
}
#mkCancelView:not(.active) {
  display: none !important;
}

.mk-info {
  background: rgba(0, 91, 187, 0.1);
  color: var(--mk-text);
  border: 2px solid var(--mk-ukraine-blue);
}

.mk-success {
  background: rgba(255, 213, 0, 0.1);
  color: var(--mk-text);
  border: 2px solid var(--mk-ukraine-yellow);
}

.mk-error {
  background: rgba(244, 67, 54, 0.1);
  color: var(--mk-text);
  border: 2px solid #f44336;
}

.mk-rules {
  margin: 16px 0 8px 0;
  padding: 12px 16px;
  background: var(--mk-background-secondary);
  border-radius: 16px;
  border: 2px solid rgba(255, 213, 0, 0.2);
  position: relative;
}

.mk-rules::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--mk-ukraine-yellow);
  border-radius: 16px 16px 0 0;
}

.mk-beneficiary {
  margin-top: 16px;
  padding: 16px;
  background: var(--mk-background-secondary);
  border-radius: 12px;
  font-size: 13px;
  color: var(--mk-text-light);
  line-height: 1.5;
  border: 1px solid var(--mk-border);
}

.mk-beneficiary strong {
  color: var(--mk-text);
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

/* Fix for donation form after merging steps */

/* Remove progress bar completely */
.mk-progress,
.mk-step-indicator {
  display: none !important;
}

/* Center header text */
.mk-step-header {
  text-align: center;
  margin-bottom: 24px;
}

/* Increase padding for all steps */
.mk-step {
  padding: 24px 24px 16px;
}

/* Remove step buttons styling since we only have a single button now */
#mkStep1 .mk-btn-primary {
  width: 100%;
  margin-top: 24px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .mk-step {
    padding: 24px 20px 20px;
  }

  .mk-step-header h2 {
    font-size: 22px;
    font-weight: 700;
  }
}

@media (max-width: 480px) {
  .mk-step {
    padding: 20px 16px 16px;
  }

  .mk-step-header h2 {
    font-size: 20px;
    font-weight: 700;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@media (max-width: 768px) {
  .mk-modal.show {
    padding: 12px;
  }

  .mk-modal-wrapper {
    width: 100%;
    max-width: none;
  }

  .mk-modal-content {
    border-radius: 16px;
  }

  .mk-step {
    padding: 20px 20px 16px;
  }

  .mk-step-header {
    margin-bottom: 16px;
  }

  .mk-step-header h2 {
    font-size: 22px;
    margin-bottom: 6px;
    font-weight: 700;
    color: var(--mk-primary);
  }

  /* (Removed previous 3-col override for .mk-amounts to enforce only 4 cols under 768px) */

  .mk-step-header p {
    font-size: 13px;
    margin-bottom: 12px;
  }

  .mk-form-group {
    margin-bottom: 14px;
  }

  .mk-form-group input {
    padding: 12px 14px;
    font-size: 16px;
  }

  .mk-rules,
  .mk-consent {
    margin: 16px 0 12px;
    padding: 14px;
  }

  .mk-beneficiary {
    margin-top: 14px;
    padding: 12px;
    font-size: 11px;
  }

  .mk-step-buttons {
    margin-top: 16px;
    gap: 10px;
  }

  .mk-modal-footer {
    padding: 12px 16px;
    border-radius: 0 0 16px 16px;
  }

  .mk-lang-controls {
    gap: 12px;
    flex-direction: row;
  }

  .mk-lang-select {
    padding: 6px 10px;
    font-size: 12px;
    min-width: 60px;
  }

  .mk-cancel-link {
    font-size: 10px;
    padding: 2px 4px;
  }

  .mk-close {
    right: 16px;
    top: 12px;
    width: 36px;
    height: 36px;
    font-size: 20px;
  }

  .mk-progress {
    display: none;
  }

  .mk-step-indicator {
    display: none;
  }

  /* (Removed previous 2-col override for .mk-amounts at narrow widths) */

  .mk-amount-btn {
    padding: 16px 12px;
    font-size: 16px;
    min-height: 50px;
  }

  .mk-consent {
    margin: 24px 0 20px;
    padding: 20px;
  }

  .mk-rules {
    margin: 24px 0 20px;
    padding: 20px;
  }

  .mk-checkbox {
    gap: 12px;
    font-size: 14px;
  }

  .mk-checkmark {
    width: 24px;
    height: 24px;
  }

  .mk-btn {
    padding: 16px 20px;
    font-size: 15px;
    min-height: 50px;
  }

  .mk-loading {
    padding: 48px 20px;
  }

  .mk-spinner {
    width: 48px;
    height: 48px;
  }

  .mk-cancel-view {
    padding: 20px 16px 16px;
  }
}

@media (max-width: 480px) {
  .mk-modal.show {
    padding: 8px;
  }

  .mk-modal-wrapper {
    width: 100%;
    max-width: none;
  }

  .mk-modal-content {
    border-radius: 12px;
  }

  .mk-step {
    padding: 16px 16px 20px;
  }

  .mk-step-header h2 {
   margin: 0 0 8px 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--mk-primary);
  line-height: 1.3;
  }

  .mk-amounts {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }

  .mk-custom-amount-btn {
    grid-column: 1 / -1;
  }

  .mk-amount-btn {
    padding: 14px 8px;
    font-size: 15px;
    min-height: 44px;
  }

  .mk-form-group {
    margin-bottom: 12px;
  }

  .mk-form-group input {
    padding: 10px 12px;
    font-size: 16px;
  }

  .mk-rules,
  .mk-consent {
    margin: 12px 0 10px;
    padding: 12px;
  }

  .mk-beneficiary {
    margin-top: 12px;
    padding: 10px;
    font-size: 10px;
  }

  .mk-step-buttons {
    margin-top: 14px;
    gap: 8px;
  }

  .mk-modal-footer {
    padding: 10px 12px;
    border-radius: 0 0 12px 12px;
  }

  .mk-lang-controls {
    flex-direction: column;
    gap: 6px;
  }

  .mk-lang-select {
    padding: 5px 8px;
    font-size: 11px;
    min-width: 55px;
  }

  .mk-cancel-link {
    font-size: 9px;
    padding: 1px 3px;
  }

  .mk-cancel-view {
    padding: 16px 16px 20px;
  }

  .mk-message h3 {
    font-size: 24px;
  }
}

/* Optimize spacing for a more compact form */
.mk-step {
  padding: 24px 24px 16px;
  max-height: 90vh;
  overflow-y: auto;
}

.mk-step-header {
  margin-bottom: 16px;
}

.mk-form-group {
  margin-bottom: 16px;
}

.mk-rules {
  margin: 16px 0;
  padding: 16px;
}

.mk-beneficiary {
  margin-top: 16px;
  padding: 16px;
}

.mk-btn {
  margin-top: 16px;
}

.mk-lang-controls {
  margin-top: 16px;
  padding-top: 12px;
}

/* Embedded MakeCommerce checkout styling */
#mkCheckoutContainer {
  width: 100%;
  margin: 20px auto 0;
  border-radius: 12px;
  overflow: hidden;
  animation: fadeIn 0.5s ease;
  background: white;
  border: 1px solid var(--mk-border);
  position: relative;
  z-index: 1;
  display: none; /* Hidden by default until it has content */
}

/* Only show container when it has content */
#mkCheckoutContainer:not(:empty) {
  display: block !important;
  min-height: 500px;
}

/* Style the form and button inside checkout container */
#mkCheckoutContainer form {
  width: 100% !important;
  height: 500px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-direction: column !important;
  background: linear-gradient(135deg, var(--mk-background-secondary), white);
  border-radius: 12px;
}

#mkCheckoutContainer #mkCheckoutBtn {
  background: var(--mk-primary) !important;
  color: white !important;
  border: none !important;
  border-radius: 12px !important;
  padding: 20px 40px !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 4px 16px rgba(49, 70, 65, 0.3) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

#mkCheckoutContainer #mkCheckoutBtn:hover {
  background: var(--mk-accent) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px rgba(49, 70, 65, 0.4) !important;
}

/* Add some descriptive text above the button */
#mkCheckoutContainer form::before {
  content: "Click to open secure payment form";
  font-size: 16px;
  color: var(--mk-text-light);
  margin-bottom: 20px;
  text-align: center;
}

/* Override any MakeCommerce modal styles to ensure it appears above our modal */
.maksekeskus-checkout-modal,
.maksekeskus-modal,
.mk-checkout-modal,
[id^="maksekeskus-checkout-"],
[class^="maksekeskus-checkout-"] {
  z-index: 9999999 !important;
}

/* Ensure modal has appropriate z-index */
.mk-modal {
  z-index: 999999 !important;
}

.mk-modal-content {
  z-index: 1000000 !important;
  position: relative;
}

/* Step 3 adjustments */
#mkStep3 {
  padding: 24px 24px 20px;
  z-index: 1000001 !important;
  position: relative;
}

/* Hide loading when checkout is ready */
#mkCheckoutContainer:not(:empty) + #mkLoadingSpinner {
  display: none !important;
}

/* Payment method grid (visual-only for recurring donations) */
.mk-methods {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.mk-method-btn {
  background: var(--mk-background);
  border: 2px solid var(--mk-border);
  padding: 12px 16px;
  border-radius: 8px;
  cursor: default;
  position: relative;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  min-width: 120px;
}

.mk-method-btn img {
  max-width: 80px;
  max-height: 30px;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.mk-method-btn.selected {
  border-color: var(--mk-ukraine-yellow);
  background: rgba(255, 213, 0, 0.1);
}

.mk-method-btn.selected img {
  opacity: 1;
}

/* Check icon for selected state */
.mk-method-btn.selected::after {
  content: "✓";
  position: absolute;
  top: -8px;
  right: -8px;
  width: 20px;
  height: 20px;
  background: var(--mk-ukraine-yellow);
  color: var(--mk-text);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  border: 2px solid var(--mk-background);
}

/* Payment provider logo */
.mk-payment-provider {
  margin-top: 12px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.mk-payment-provider-text {
  font-size: 10px;
  color: var(--mk-text-light);
  opacity: 0.8;
  font-weight: 400;
  white-space: nowrap;
  line-height: 1.2;
}

.mk-payment-provider-logo {
  max-width: 55px;
  max-height: 18px;
  width: 55px;
  height: auto;
  object-fit: contain;
  opacity: 0.5;
  transition: opacity 0.3s ease;
  flex-shrink: 0;
}

.mk-payment-provider-logo:hover {
  opacity: 0.7;
}
