:root {
  --mjf-hellobar-height: 0px;
}

/* Hellobar styling */
.mjf-hellobar-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  background-color: #ffffff;
  color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid white;
  padding: 12px 24px;
  font-family: inherit;
  transition:
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    top 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateY(0);
}

/* Adjust top position when WordPress admin bar is present */
body.admin-bar .mjf-hellobar-wrapper {
  top: 32px;
}

@media screen and (max-width: 782px) {
  body.admin-bar .mjf-hellobar-wrapper {
    top: 46px;
  }
}

.mjf-hellobar-content {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  text-align: center;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.mjf-hellobar-title {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mjf-hellobar-icon {
  font-size: 18px;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 4px;
  vertical-align: middle;
}

.mjf-hellobar-text {
  display: inline;
}

.mjf-hellobar-text p {
  display: inline;
  margin: 0;
  padding: 0;
}

.mjf-hellobar-text a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
  transition: opacity 0.2s;
}

.mjf-hellobar-text a:hover {
  opacity: 0.8;
}

/* Modals styling */
.mjf-notice-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.3s ease;
  padding: 20px;
  box-sizing: border-box;
}

.mjf-notice-modal-box {
  background-color: #ffffff;
  color: #000000;
  width: 100%;
  max-width: 480px;
  border-radius: 2px;
  padding: 32px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  transform: scale(1);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

/* Prevent body scrolling when modal is open */
body.mjf-modal-open {
  overflow: hidden !important;
}

.mjf-notice-modal-title {
  font-size: 20px;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 16px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
}

.mjf-notice-modal-icon {
  font-size: 24px;
  width: 24px;
  height: 24px;
  margin-right: 10px;
  flex-shrink: 0;
}

.mjf-notice-modal-body {
  font-size: 15px;
  line-height: 1.6;
  color: #4b5563;
  margin-bottom: 24px;
}

.mjf-notice-modal-body strong,
.mjf-notice-modal-body b,
.mjf-notice-modal-body u {
  color: #000000;
}

.mjf-notice-modal-body p {
  margin-top: 0;
  margin-bottom: 12px;
}

.mjf-notice-modal-body p:last-child {
  margin-bottom: 0;
}

.mjf-notice-modal-body a {
  color: #000000;
  text-decoration: underline;
  font-weight: 600;
}

.mjf-notice-modal-footer {
  display: flex;
  justify-content: flex-end;
}

.mjf-notice-modal-close-btn {
  background-color: #000000;
  color: #ffffff;
  border: 1px solid #000000;
  padding: 12px 32px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  border-radius: 4px;
  transition:
    background-color 0.2s,
    color 0.2s;
}

.mjf-notice-modal-close-btn:hover {
  background-color: #ffffff;
  color: #000000;
}

/* Animations and helpers */
.mjf-notice-hidden {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none;
}

.mjf-notice-slideup {
  transform: translateY(-100%);
}

/* Apply layout adjustment if hellobar is present */
body.mjf-has-hellobar .header {
  top: var(--mjf-hellobar-height) !important;
  transition: top 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

body.admin-bar.mjf-has-hellobar .header {
  top: calc(32px + var(--mjf-hellobar-height)) !important;
}

body.mjf-has-hellobar #content {
  padding-top: calc(140px + var(--mjf-hellobar-height)) !important;
  transition: padding-top 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* For mobile: adjust the header offset if necessary */
@media (max-width: 640px) {
  .mjf-hellobar-wrapper {
    padding: 10px 40px 10px 16px;
  }
}

@media screen and (max-width: 782px) {
  body.admin-bar.mjf-has-hellobar .header {
    top: calc(46px + var(--mjf-hellobar-height)) !important;
  }
}

/* Inline Notices styling */
.mjf-notice-inline-wrapper {
  background-color: #f4f4f4;
  padding: 16px 20px;
  margin-bottom: 24px;
  border-radius: 4px;
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  transition: opacity 0.3s ease;
  box-sizing: border-box;
  width: 100%;
}

.mjf-notice-inline-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.mjf-notice-inline-icon {
  font-size: 20px;
  width: 20px;
  height: 20px;
  color: #000000;
  margin-top: 2px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mjf-notice-inline-text-wrapper {
  flex-grow: 1;
}

.mjf-notice-inline-title {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 6px 0;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #000000;
}

.mjf-notice-inline-body {
  font-size: 13.5px;
  line-height: 1.5;
  color: #4b5563;
}

.mjf-notice-inline-body p {
  margin: 0 0 8px 0;
}

.mjf-notice-inline-body p:last-child {
  margin-bottom: 0;
}

.mjf-notice-inline-body strong,
.mjf-notice-inline-body b,
.mjf-notice-inline-body u {
  color: #000000;
}
