/* ===================================================================
   MODULFIX NAPELEM KALKULÁTOR — WordPress Plugin Styles
   All selectors prefixed with .mfk- to avoid theme conflicts
   =================================================================== */

/* ===== LAYOUT ===== */
.mfk-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px 60px;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: #1a1a2e;
  line-height: 1.6;
}
.mfk-wrapper *, .mfk-wrapper *::before, .mfk-wrapper *::after {
  box-sizing: border-box;
}
.mfk-header {
  text-align: center;
  margin-bottom: 32px;
}
.mfk-header h2 {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 8px;
}
.mfk-header p {
  font-size: 15px;
  color: #666;
  margin: 0;
}

/* ===== STEPPER ===== */
.mfk-stepper {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.mfk-step-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  color: #999;
  position: relative;
  cursor: default;
}
.mfk-step-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e0e0e0;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.3s;
}
.mfk-step-indicator.active .mfk-step-num {
  background: #e8740c;
  color: #fff;
}
.mfk-step-indicator.active {
  color: #1a1a2e;
}
.mfk-step-indicator.done .mfk-step-num {
  background: #27ae60;
  color: #fff;
}
.mfk-step-indicator.done {
  color: #27ae60;
  cursor: pointer;
}
.mfk-step-connector {
  width: 40px;
  height: 2px;
  background: #e0e0e0;
  align-self: center;
}
.mfk-step-connector.done {
  background: #27ae60;
}

/* ===== CARD ===== */
.mfk-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  padding: 32px;
  margin-bottom: 20px;
}
.mfk-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 6px;
  color: #1a1a2e;
}
.mfk-subtitle {
  font-size: 14px;
  color: #777;
  margin: 0 0 24px;
}

/* ===== STEP SECTIONS ===== */
.mfk-step { display: none; }
.mfk-step.active { display: block; }

/* ===== ROOF TYPE GRID ===== */
.mfk-roof-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.mfk-roof-option {
  border: 2px solid #e8e8e8;
  border-radius: 10px;
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: #fafafa;
}
.mfk-roof-option:hover {
  border-color: #e8740c;
  background: #fff8f0;
}
.mfk-roof-option.selected {
  border-color: #e8740c;
  background: #fff3e6;
  box-shadow: 0 0 0 3px rgba(232,116,12,0.15);
}
.mfk-roof-icon {
  display: block;
  margin-bottom: 10px;
  height: 48px;
  line-height: 48px;
}
.mfk-roof-icon img {
  max-height: 48px;
  width: auto;
}
.mfk-roof-name {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a2e;
  display: block;
}
.mfk-roof-desc {
  font-size: 12px;
  color: #888;
  margin-top: 4px;
  display: block;
}

/* ===== FORM FIELDS ===== */
.mfk-form-group {
  margin-bottom: 20px;
}
.mfk-form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
}
.mfk-req {
  color: #e74c3c;
}
.mfk-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.mfk-wrapper input[type="number"],
.mfk-wrapper select {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 15px;
  color: #1a1a2e;
  background: #fff;
  transition: border-color 0.2s;
  -moz-appearance: textfield;
}
.mfk-wrapper input[type="number"]:focus,
.mfk-wrapper select:focus {
  outline: none;
  border-color: #e8740c;
  box-shadow: 0 0 0 3px rgba(232,116,12,0.1);
}
.mfk-wrapper input[type="number"]::-webkit-outer-spin-button,
.mfk-wrapper input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ===== HELP TOOLTIP ===== */
.mfk-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e8740c;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  cursor: help;
  margin-left: 6px;
  position: relative;
  vertical-align: middle;
}
.mfk-help-bubble {
  display: none;
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a2e;
  color: #fff;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  padding: 12px 16px;
  border-radius: 8px;
  width: 300px;
  max-width: 90vw;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}
.mfk-help-bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #1a1a2e;
}
.mfk-help:hover .mfk-help-bubble,
.mfk-help:focus .mfk-help-bubble {
  display: block;
}

/* ===== ORIENTATION TOGGLE ===== */
.mfk-orientation-toggle {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}
.mfk-orient-option {
  flex: 1;
  border: 2px solid #e8e8e8;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: #fafafa;
}
.mfk-orient-option:hover {
  border-color: #e8740c;
}
.mfk-orient-option.selected {
  border-color: #e8740c;
  background: #fff3e6;
}
.mfk-orient-icon {
  margin-bottom: 6px;
}
.mfk-orient-label {
  font-size: 14px;
  font-weight: 600;
}

/* ===== BUTTONS ===== */
.mfk-btn-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
}
.mfk-btn {
  padding: 14px 28px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.mfk-btn-primary {
  background: #e8740c;
  color: #fff;
}
.mfk-btn-primary:hover {
  background: #d06508;
}
.mfk-btn-primary:disabled {
  background: #ccc;
  cursor: not-allowed;
}
.mfk-btn-secondary {
  background: #e8e8e8;
  color: #555;
}
.mfk-btn-secondary:hover {
  background: #ddd;
}

/* ===== RESULTS TABLE ===== */
.mfk-table-wrap {
  overflow-x: auto;
}
.mfk-results-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}
.mfk-results-table th {
  background: #f5f5f5;
  padding: 12px 14px;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-bottom: 2px solid #e0e0e0;
}
.mfk-results-table td {
  padding: 14px;
  border-bottom: 1px solid #eee;
  font-size: 14px;
  vertical-align: middle;
}
.mfk-results-table tr:last-child td {
  border-bottom: none;
}
.mfk-prod-img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border-radius: 6px;
  background: #f9f9f9;
  border: 1px solid #eee;
}
.mfk-prod-name {
  font-weight: 600;
  color: #1a1a2e;
}
.mfk-prod-name a {
  color: #e8740c;
  text-decoration: none;
}
.mfk-prod-name a:hover {
  text-decoration: underline;
}
.mfk-prod-sku {
  font-size: 12px;
  color: #999;
}
.mfk-qty-input {
  width: 70px;
  padding: 8px 10px;
  text-align: center;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
}
.mfk-qty-input:focus {
  border-color: #e8740c;
  outline: none;
}
.mfk-item-price {
  font-weight: 600;
  color: #1a1a2e;
  white-space: nowrap;
}
.mfk-item-total {
  font-weight: 700;
  color: #e8740c;
  white-space: nowrap;
}

/* ===== TOTALS ===== */
.mfk-totals-box {
  background: #f8f4ef;
  border-radius: 10px;
  padding: 20px 24px;
  margin-top: 20px;
}
.mfk-totals-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 15px;
}
.mfk-totals-row.mfk-grand {
  border-top: 2px solid #e8740c;
  margin-top: 8px;
  padding-top: 12px;
  font-size: 18px;
  font-weight: 700;
  color: #e8740c;
}

/* ===== ADD TO CART ===== */
.mfk-cart-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.mfk-btn-cart {
  padding: 16px 32px;
  background: #e8740c;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mfk-btn-cart:hover {
  background: #d06508;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(232,116,12,0.3);
}

/* ===== CART FEEDBACK ===== */
.mfk-cart-feedback {
  display: none;
  padding: 16px 20px;
  border-radius: 8px;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 600;
}
.mfk-cart-feedback.mfk-success {
  display: block;
  background: #eafaf1;
  color: #1e8449;
  border: 1px solid #82e0aa;
}
.mfk-cart-feedback.mfk-error {
  display: block;
  background: #fdedec;
  color: #c0392b;
  border: 1px solid #f1948a;
}
.mfk-cart-feedback.mfk-loading {
  display: block;
  background: #fef9e7;
  color: #9a7d0a;
  border: 1px solid #f9e79f;
}

/* ===== INFO BOX ===== */
.mfk-info-box {
  background: #eef6ff;
  border-left: 4px solid #3498db;
  border-radius: 0 8px 8px 0;
  padding: 14px 18px;
  margin: 16px 0;
  font-size: 13px;
  color: #2c3e50;
}
.mfk-info-box strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

/* ===== CHECKBOX TOGGLE ===== */
.mfk-toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 14px;
  background: #fafafa;
  border-radius: 8px;
}
.mfk-toggle-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #e8740c;
}
.mfk-toggle-row label {
  font-size: 14px;
  margin-bottom: 0;
  cursor: pointer;
}

/* ===== LAYOUT MODE SELECTION (step 3) ===== */
.mfk-layout-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.mfk-layout-option {
  border: 2px solid #e8e8e8;
  border-radius: 12px;
  padding: 24px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: #fafafa;
}
.mfk-layout-option:hover {
  border-color: #e8740c;
  background: #fff8f0;
}
.mfk-layout-option.selected {
  border-color: #e8740c;
  background: #fff3e6;
  box-shadow: 0 0 0 3px rgba(232,116,12,0.15);
}
.mfk-layout-option h4 {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 12px 0 6px;
}
.mfk-layout-option p {
  font-size: 13px;
  color: #666;
  margin: 0 0 10px;
  line-height: 1.5;
}
.mfk-layout-eg {
  display: inline-block;
  background: #f0f0f0;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  color: #555;
  font-weight: 600;
}
.mfk-layout-option.selected .mfk-layout-eg {
  background: rgba(232,116,12,0.12);
  color: #b85a06;
}
.mfk-layout-icon {
  color: #e8740c;
}
.mfk-layout-option.selected .mfk-layout-icon { color: #d06508; }

/* ===== VISUAL ROW BUILDER ===== */
#mfk-rowBuilder {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}
.mfk-visual-row {
  border: 2px solid #e8e8e8;
  border-radius: 10px;
  padding: 14px 16px;
  background: #fafafa;
  transition: border-color 0.2s;
}
.mfk-visual-row:hover { border-color: #e8740c; }
.mfk-vr-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.mfk-vr-label {
  font-weight: 700;
  font-size: 14px;
  color: #1a1a2e;
  min-width: 60px;
}
.mfk-vr-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}
.mfk-vr-minus, .mfk-vr-plus {
  width: 30px;
  height: 30px;
  border: 2px solid #e8740c;
  border-radius: 6px;
  background: #fff;
  color: #e8740c;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
  transition: all 0.15s;
}
.mfk-vr-minus:hover, .mfk-vr-plus:hover {
  background: #e8740c;
  color: #fff;
}
.mfk-vr-count {
  width: 60px !important;
  padding: 6px 8px !important;
  text-align: center;
  border: 2px solid #e0e0e0 !important;
  border-radius: 6px !important;
  font-size: 15px !important;
  font-weight: 700;
}
.mfk-vr-unit {
  font-size: 13px;
  color: #666;
  margin-left: 2px;
}
.mfk-vr-delete {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: #fee;
  color: #c0392b;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  transition: all 0.15s;
  padding: 0;
}
.mfk-vr-delete:hover { background: #c0392b; color: #fff; }
.mfk-vr-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 18px;
}
.mfk-panel-box {
  width: 28px;
  height: 18px;
  background: linear-gradient(135deg, #e8740c, #f5a623);
  border-radius: 3px;
  opacity: 0.75;
}
.mfk-panel-more {
  font-size: 11px;
  color: #999;
  align-self: center;
  padding-left: 2px;
}
.mfk-vr-total {
  font-size: 13px;
  color: #555;
  margin-bottom: 10px;
  padding: 8px 12px;
  background: #f5f5f5;
  border-radius: 6px;
}
.mfk-vr-mismatch {
  color: #d35400;
  font-weight: 600;
}
.mfk-btn-sm {
  padding: 8px 16px !important;
  font-size: 13px !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .mfk-card { padding: 20px 16px; }
  .mfk-roof-grid { grid-template-columns: 1fr 1fr; }
  .mfk-layout-options { grid-template-columns: 1fr; }
  .mfk-form-row { grid-template-columns: 1fr; }
  .mfk-btn-row { flex-direction: column; }
  .mfk-btn { width: 100%; text-align: center; }
  .mfk-results-table { font-size: 13px; }
  .mfk-prod-img { width: 40px; height: 40px; }
  .mfk-step-label { display: none; }
  .mfk-orientation-toggle { flex-direction: column; }
  .mfk-vr-controls { flex-wrap: wrap; gap: 4px; }
  .mfk-panel-box { width: 22px; height: 14px; }
  .mfk-quote-row { flex-direction: column; }
  .mfk-btn-quote { width: 100%; }
}

/* ===== ÁRAJÁNLAT EMAIL SZEKCIÓ ===== */

.mfk-quote-section {
  margin: 24px 0;
  background: #f0f7ff;
  border: 1px solid #c7dff7;
  border-radius: 10px;
  padding: 20px 24px;
}

.mfk-quote-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  color: #1a73a7;
  font-weight: 600;
  font-size: 15px;
}

.mfk-quote-header svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: #1a73a7;
}

.mfk-quote-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mfk-quote-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.mfk-quote-row .mfk-input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid #c7dff7;
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: #1a1a2e;
  transition: border-color 0.2s;
  outline: none;
}

.mfk-quote-row .mfk-input:focus {
  border-color: #1a73a7;
  box-shadow: 0 0 0 3px rgba(26,115,167,0.12);
}

/* Árajánlat küldés gomb */
.mfk-btn-quote {
  background: #1a73a7;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, opacity 0.2s;
  font-family: inherit;
}

.mfk-btn-quote:hover:not(:disabled) {
  background: #155f8c;
}

.mfk-btn-quote:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.mfk-quote-options {
  font-size: 14px;
  color: #555;
}

.mfk-quote-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.mfk-quote-gdpr {
  font-size: 12px;
  color: #888;
  margin: 0;
  line-height: 1.5;
}

/* Üzenet visszajelzés */
.mfk-quote-message {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
}

.mfk-quote-success {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

.mfk-quote-error {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ef9a9a;
}

/* ===== PER-ROW ORIENTATION TOGGLE ===== */
.mfk-vr-orient {
  display: flex;
  gap: 4px;
  margin-left: 8px;
}
.mfk-vr-orient-btn {
  font-size: 11px;
  padding: 3px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #f5f5f5;
  cursor: pointer;
  color: #555;
  transition: all 0.2s;
}
.mfk-vr-orient-btn.active {
  background: #e8740c;
  border-color: #e8740c;
  color: #fff;
}

/* ===== TOGGLE BUTTON GROUP ===== */
.mfk-toggle-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.mfk-toggle-btn {
  padding: 8px 16px;
  border: 2px solid #ddd;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  color: #333;
  transition: all 0.2s;
}
.mfk-toggle-btn.selected {
  border-color: #e8740c;
  background: #fff5ec;
  color: #e8740c;
  font-weight: 600;
}

/* ===== ROOF NOTE ===== */
.mfk-roof-note {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 8px;
  padding: 12px 16px;
  margin-top: 12px;
  font-size: 14px;
  color: #5d4037;
  grid-column: 1 / -1;
}

/* ===== WARNING INFO BOX ===== */
.mfk-info-warning {
  background: #fff3e0;
  border-left: 4px solid #ff8f00;
  color: #4e3400;
}
