/* ==========================================================================
   Contact Modal + Sticky Bar — doskonalydom.com.pl
   ========================================================================== */

/* --- Magnific Popup overrides --- */

.mfp-contact-modal .mfp-bg {
  opacity: 0.5;
}

.mfp-contact-modal .mfp-container {
  padding: 20px;
}

.mfp-contact-modal .mfp-close {
  font-size: 28px;
  color: #2c2c2a;
  opacity: 0.6;
  right: 8px;
  top: 8px;
}

.mfp-contact-modal .mfp-close:hover {
  opacity: 1;
}

/* --- Modal wrapper --- */

.contact-modal {
  position: relative;
  max-width: 560px;
  margin: 40px auto;
  background: #fff;
  padding: 44px 40px 36px;
  border-radius: 2px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
}

/* --- Badge kontekstowy --- */

.cm-badge {
  display: none;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #2c2c2a;
  background: #f4f1e8;
  padding: 4px 12px;
  margin-bottom: 12px;
  border-left: 3px solid #c9b458;
}

.cm-badge.is-visible {
  display: inline-block;
}

/* --- Heading --- */

.cm-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #2c2c2a;
  margin: 0 0 6px;
}

.cm-subtitle {
  font-size: 0.9rem;
  color: #888;
  margin: 0 0 28px;
  font-weight: 400;
}

/* --- Form fields --- */

.cm-form .cm-field-group {
  margin-bottom: 18px;
}

.cm-form label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: #2c2c2a;
  margin-bottom: 5px;
  letter-spacing: 0.02em;
}

.cm-form label .cm-optional {
  color: #aaa;
  font-weight: 400;
}

.cm-form input[type="text"],
.cm-form input[type="email"],
.cm-form input[type="tel"],
.cm-form textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.95rem;
  color: #2c2c2a;
  background: #f8f7f4;
  border: 1px solid #e0ddd5;
  border-radius: 2px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  font-family: 'Poppins', sans-serif;
  box-sizing: border-box;
}

.cm-form input:focus,
.cm-form textarea:focus {
  border-color: #c9b458;
  background: #fff;
}

.cm-form textarea {
  min-height: 90px;
  resize: vertical;
}

/* --- Checkbox RODO --- */

.cm-checkbox-group {
  margin-bottom: 22px;
}

.cm-checkbox-group label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.75rem;
  color: #666;
  line-height: 1.5;
  cursor: pointer;
}

.cm-checkbox-group input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: #c9b458;
}

.cm-checkbox-group a {
  color: #c9b458;
  text-decoration: underline;
}

.cm-checkbox-group a:hover {
  color: #2c2c2a;
}

/* --- Validation errors --- */

.cm-form label.error {
  display: block;
  color: #c0392b;
  font-size: 0.75rem;
  font-weight: 400;
  margin-top: 4px;
  margin-bottom: 0;
}

.cm-form input.error,
.cm-form textarea.error {
  border-color: #c0392b;
}

.cm-form .cm-checkbox-group label.error {
  padding-left: 26px;
}

/* --- Submit button --- */

.cm-form .cm-submit-btn {
  display: block;
  width: 100%;
  padding: 13px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #2c2c2a;
  background: #c9b458;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: background 0.3s, opacity 0.3s;
}

.cm-form .cm-submit-btn:hover {
  background: #2c2c2a;
  color: #fff;
}

.cm-form .cm-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.cm-trust-note {
  text-align: center;
  font-size: 0.72rem;
  color: #aaa;
  margin-top: 10px;
}

/* --- Status messages --- */

.cm-status {
  display: none;
  text-align: center;
  padding: 30px 10px;
}

.cm-status.is-visible {
  display: block;
}

.cm-status-icon {
  font-size: 2.4rem;
  margin-bottom: 12px;
}

.cm-status-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #2c2c2a;
  margin-bottom: 8px;
}

.cm-status-text {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 22px;
}

.cm-status .cm-close-btn {
  display: inline-block;
  padding: 10px 28px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #2c2c2a;
  background: #f4f1e8;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: background 0.2s;
}

.cm-status .cm-close-btn:hover {
  background: #e8e4d6;
}

/* --- CTA sections on pages --- */

.cta-modal-section {
  text-align: center;
  padding: 50px 20px;
  background: #f8f7f4;
}

.cta-modal-section p {
  font-size: 1.05rem;
  color: #666;
  margin-bottom: 20px;
}

/* --- Sticky bar --- */

#sticky-contact-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1040;
  background: #2c2c2a;
  color: #fff;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  transform: translateY(100%);
  transition: transform 0.35s ease;
  font-size: 0.88rem;
}

#sticky-contact-bar.sticky-bar--visible {
  transform: translateY(0);
}

#sticky-contact-bar a.sticky-bar-phone {
  color: #c9b458;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

#sticky-contact-bar a.sticky-bar-phone:hover {
  color: #fff;
}

#sticky-contact-bar .sticky-bar-divider {
  color: #555;
}

#sticky-contact-bar .sticky-bar-trigger {
  color: #fff;
  background: #c9b458;
  padding: 6px 18px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

#sticky-contact-bar .sticky-bar-trigger:hover {
  background: #b8a44d;
}

/* --- Responsive --- */

@media (max-width: 768px) {
  .contact-modal {
    margin: 10px auto;
    padding: 30px 22px 26px;
    max-width: calc(100% - 10px);
  }

  .cm-title {
    font-size: 1.3rem;
  }

  .cm-subtitle {
    font-size: 0.82rem;
  }

  #sticky-contact-bar {
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.8rem;
    padding: 10px 14px;
  }

  #sticky-contact-bar .sticky-bar-trigger {
    font-size: 0.78rem;
    padding: 5px 14px;
  }
}
