/*
Theme Name: Sundeer
Description: This is a custom child theme for Sundeer.hu
Theme URI:   https://themeforest.net/item/salient-responsive-multipurpose-theme/4363266
Author: Gergely Konrád
Author URI:  https://gergely-konrad.com/
Template: salient
Version: 1.0
*/

/* Lang switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  margin-left: 8px;
}
.lang-switcher ul {
  position: relative;
  top: initial;
  left: initial;
  pointer-events: all;
}
.lang-switcher ul li img {
  width: 26px !important;
  margin-bottom: 3px !important;
}
.lang-switcher .current-flag {
  position: relative;
}
.lang-switcher .current-flag > li {
  padding-top: 4px;
  opacity: 0.7;
  transition: opacity 0.3s ease-in-out;
}
.lang-switcher .current-flag > li:not(.current-lang) {
  display: none;
}
.lang-switcher .current-flag > li.current-lang a {
  pointer-events: none;
  cursor: default;
}

.lang-switcher .dropdown-flags {
  position: absolute;
  padding: 3px 7px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 3px;
  top: 35px;
  left: -5px;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s ease-in-out;
}

.lang-switcher .dropdown-flags:before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 14px;
  width: 0;
  border-bottom: 5px solid rgba(255, 255, 255, 0.4);
  border-top: 5px solid transparent;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
}

.lang-switcher .current-flag:hover > li {
  opacity: 1;
}
.lang-switcher .current-flag:hover .dropdown-flags {
  transform: translateY(0);
  opacity: 1;
}

/* Newsletter */

.newsletter-inline {
  display: flex;
  align-items: center;
  flex-direction: column;
}

.newsletter-row > p {
  display: flex;
  align-items: start;
  gap: 12px;
  position: relative;
}

.newsletter-email {
  max-width: 400px;
  width: 100%;
}

.newsletter-accept {
  margin-top: 12px;
}

.newsletter-inline .wpcf7-spinner {
  position: absolute;
  right: -70px;
  top: 11px;
  background: red;
}

@media (max-width: 600px) {
  .newsletter-row {
    flex-direction: column;
    align-items: stretch;
  }
}

.contact-form .cf7-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.contact-form .cf7-col {
  flex: 1;
}

.contact-form .cf7-col-full {
  width: 100%;
}

/* ===== Input + textarea ===== */

body .span_12.light .contact-form input[type="text"],
body .span_12.light .contact-form input[type="email"],
body .span_12.light .contact-form input[type="tel"],
body .span_12.light .contact-form textarea {
  background: #ffffff;
  color: #cc4e0f;
}

/* ===== CF7 default margin reset (Salient miatt fontos) ===== */

.contact-form .wpcf7-form p,
.newsletter-inline .wpcf7-form p {
  margin: 0;
}

/* ===== Response message ===== */

.contact-form .wpcf7-response-output {
  margin-top: 20px;
}

.wpcf7-form .wpcf7-not-valid-tip,
.wpcf7 .wpcf7-response-output {
  background: none;
  box-shadow: none;
}
.wpcf7 .wpcf7-response-output {
  color: #364c1e;
  border: none;
}

.wpcf7 form.sent .wpcf7-response-output {
  color: inherit !important;
  border: none;
  text-align: center;
}

/* ===== Mobil ===== */

@media (max-width: 768px) {
  .contact-form .cf7-row {
    flex-direction: column;
  }
}

/* time table */

.mptt-shortcode-wrapper .mptt-shortcode-table tbody td {
  padding: 0 !important;
}

#all-events
  .mptt-shortcode-wrapper
  .mptt-shortcode-table
  tr.mptt-shortcode-row
  th {
  height: 60px;
  max-height: 60px;
  vertical-align: middle;
}

#all-events .mptt-shortcode-wrapper {
  overflow: hidden;
}
#all-events .all-events-wrapper {
  overflow-x: scroll;
}

/* Eventin: hide billing section on purchase page (collected at WooCommerce checkout) */
.eventin-billing-title,
.eventin-billing-form-container {
  display: none !important;
}

/* Currency switcher */
.sundeer-currency-switcher {
  display: inline-flex;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 6px;
  overflow: hidden;
}
.sundeer-curr-btn {
  padding: 10px 24px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: inherit;
  transition:
    background 0.2s,
    color 0.2s;
}
.sundeer-curr-btn.active {
  background: #7a190f;
  color: #f6b714;
}
.sundeer-curr-btn:not(.active):hover {
  background: rgba(0, 0, 0, 0.05);
}

/* Currency switcher loader overlay */
.sundeer-currency-loader {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.sundeer-currency-loader.visible {
  opacity: 1;
}
.sundeer-currency-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #7a190f;
  border-right-color: transparent;
  border-radius: 50%;
  animation: sundeer-spin 0.6s linear infinite;
}

/* Fix: hide inactive tab panels on initial load to prevent height stacking */
#day-by-day-events .tabbed > div.wpb_tab {
  display: none;
}
#day-by-day-events .tabbed > div:first-of-type {
  display: block;
}

/* ===== Sundeer Event Tickets form ===== */
.sundeer-event-tickets {
  width: 100%;
}
.sundeer-event-tickets .etn-single-ticket-item {
  margin-bottom: 12px;
}
.sundeer-event-tickets .ticket-header {
  margin: 0 0 6px;
  color: #7a190f !important;
  font-weight: 700;
}
.sundeer-event-tickets .etn-ticket-divider {
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  margin-bottom: 10px;
}
.sundeer-event-tickets .etn-ticket-price-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sundeer-event-tickets .etn-ticket-price strong {
  font-size: 1em;
}
.sundeer-event-tickets .etn-quantity {
  display: flex;
  align-items: center;
}
.sundeer-event-tickets .qt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  background: transparent;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0;
  transition: background 0.15s;
}
.sundeer-event-tickets .qt-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}
.sundeer-event-tickets .qt-sub {
  border-radius: 4px 0 0 4px;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}
.sundeer-event-tickets .qt-add {
  border-radius: 0 4px 4px 0;
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}
.sundeer-event-tickets .sundeer-ticket-qty {
  width: 42px !important;
  height: 32px;
  text-align: center;
  border: 1px solid rgba(0, 0, 0, 0.2) !important;
  border-left: none;
  border-right: none;
  border-radius: 0;
  margin: 0;
  padding: 0;
  -moz-appearance: textfield;
  font-size: 14px;
}
.sundeer-event-tickets .sundeer-ticket-qty::-webkit-inner-spin-button,
.sundeer-event-tickets .sundeer-ticket-qty::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.sundeer-event-tickets .etn-variable-total-price {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}
.sundeer-event-tickets .etn-ticket-total-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85em;
  opacity: 0.85;
}
.sundeer-event-tickets .sundeer-ticket-submit {
  margin-top: 16px;
  width: 100%;
}
.sundeer-event-tickets .sundeer-ticket-submit.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.sundeer-event-tickets .sundeer-ticket-submit.loading {
  opacity: 0.7;
  cursor: wait;
  pointer-events: none;
  position: relative;
}
.sundeer-event-tickets .sundeer-ticket-submit.loading::after {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 8px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: middle;
  animation: sundeer-spin 0.6s linear infinite;
}
@keyframes sundeer-spin {
  to {
    transform: rotate(360deg);
  }
}

/* eventin checkout */
#eventin-checkout .ant-checkbox-input {
  position: absolute !important;
}
#eventin-checkout .ant-checkbox-checked .ant-checkbox-inner {
  background-color: #f6b714;
  border-color: #f6b714;
}

.sndt-ticket-name {
  color: #7a190f !important;
}

/* WOOCOMMERCE */
.wc-block-components-title.wc-block-components-title {
  font-family: "Libre Baskerville";
  font-weight: 600;
  color: #7a190f;
}
.wc-block-components-checkout-return-to-cart-button,
.wc-block-components-payment-methods__save-card-info {
  display: none !important;
}
.wc-block-checkout__actions .wc-block-checkout__actions_row {
  justify-content: flex-end;
}

.woocommerce-order-received h2 {
  color: #7a190f;
  margin-bottom: 1.5rem;
}
/* Checkout - order summary */
.wp-block-woocommerce-checkout-order-summary-block
  .wc-block-components-product-name {
  font-weight: 700;
  color: #7a190f;
}
.wc-block-components-order-summary
  .wc-block-components-product-details.wc-block-components-product-details
  li {
  display: flex;
  justify-content: space-between;
}

.wc-block-components-order-summary
  .wc-block-components-product-details.wc-block-components-product-details
  li.wc-block-components-product-details__discount {
  color: green;
}
.wc-block-components-order-summary
  .wc-block-components-order-summary-item__image,
.wc-block-components-order-summary
  .wc-block-components-order-summary-item__total-price,
.wc-block-components-product-price,
.wc-block-components-totals-item__description {
  display: none;
}

.wc-block-components-order-summary
  .wc-block-components-order-summary-item__description {
  width: 100%;
}
