/*
Theme Name: eToro Gift Platform
Theme URI: 
Author: ESBE
Author URI: https://esbe.be
Description: Theme for eToro Gift Platform
Requires at least: 6.4
Tested up to: 6.4
Requires PHP: 7.0
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: etoro
*/

body,
html {
  height: 100%;
}

html {
  margin-top: 0 !important;
}

* {
  box-sizing: border-box;
}

img,
video {
  max-width: 100%;
  height: auto;
}

/* Native Blocks overrides */
.wp-block-cover {
  min-height: auto !important;
}

/* Global */
.site-header,
.site-footer {
  flex-grow: 0;
  flex-shrink: 0;
  margin: 0;
}

/* Nav header */
.etoro-nav-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  background-color: var(--wp--preset--color--secondary);
}

@media screen and (min-width: 769px) {
  .etoro-nav-header {
    padding: var(--wp--preset--spacing--medium);
  }
}

@media screen and (max-width: 768px) {
  .etoro-nav-header {
    padding: var(--wp--preset--spacing--small);
  }
}

.etoro-nav-header > * {
  flex: 1;
  flex-shrink: 0;
}

body.admin-bar .etoro-nav-header {
  top: 32px;
}

@media screen and (min-width: 769px) {
  .etoro-logo {
    max-width: 188px;
  }
}

@media screen and (max-width: 768px) {
  .etoro-logo {
    max-width: 122px;
  }
}

/* Styles */
@media screen and (max-width: 768px) {
  h1.wp-block-heading {
    font-size: 3.5rem !important;
  }
}

/* Selector */
.etoro-gift-selector {
  padding-top: var(--wp--preset--spacing--large);
}

.etoro-selector-action {
  margin-top: var(--wp--preset--spacing--medium);
  margin-bottom: 0;
  text-align: center;
}

/* Primitives Elements */
.etoro-selector button {
  -webkit-appearance: none;
  -webkit-border-radius: none;

  flex-shrink: 0;
  color: var(--wp--preset--color--primary);
  background-color: var(--wp--preset--color--secondary);
  border-radius: var(--wp--custom--radius--full);
  padding: var(--wp--preset--spacing--x-small) var(--wp--preset--spacing--small);
  font-size: var(--wp--preset--font-size--medium);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.etoro-selector button:disabled {
  opacity: 0.5;
}

.etoro-selector button:hover {
  background-color: var(--wp--preset--color--secondary-alt);
}

button.etoro-go-back {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: transparent;
  border: none;
  font-size: var(--wp--preset--font-size--base);
  font-weight: 300;
  cursor: pointer;
}

@media screen and (max-width: 768px) {
  button.etoro-go-back span {
    display: none;
  }
}

.etoro-selector button.etoro-go-back:hover {
  color: var(--wp--preset--color--secondary-alt);
  border-color: var(--wp--preset--color--secondary-alt);
}

.etoro-selector select {
  width: 100%;
  padding: var(--wp--preset--spacing--xx-small)
    var(--wp--preset--spacing--medium) var(--wp--preset--spacing--xx-small)
    var(--wp--preset--spacing--x-small);
  font-size: var(--wp--preset--font-size--medium);
  border-radius: var(--wp--custom--radius--full);
  appearance: none;
  cursor: pointer;
}

.etoro-select-wrapper {
  position: relative;
}

.etoro-select-wrapper:after {
  content: "";
  position: absolute;
  right: 0;
  top: 16px;
  right: 12px;
  width: 16px;
  height: 20px;
  background-image: url("data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiAgd2lkdGg9IjI0IiAgaGVpZ2h0PSIyNCIgIHZpZXdCb3g9IjAgMCAyNCAyNCIgIGZpbGw9Im5vbmUiICBzdHJva2U9ImN1cnJlbnRDb2xvciIgIHN0cm9rZS13aWR0aD0iMiIgIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgIHN0cm9rZS1saW5lam9pbj0icm91bmQiICBjbGFzcz0iaWNvbiBpY29uLXRhYmxlciBpY29ucy10YWJsZXItb3V0bGluZSBpY29uLXRhYmxlci1jaGV2cm9uLWRvd24iPjxwYXRoIHN0cm9rZT0ibm9uZSIgZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPjxwYXRoIGQ9Ik02IDlsNiA2bDYgLTYiIC8+PC9zdmc+");
  background-size: contain;
  background-repeat: no-repeat;
}

/* Country */

.etoro-selector-country {
  display: flex;
  justify-content: center;
  gap: var(--wp--preset--spacing--small);
  margin-top: var(--wp--preset--spacing--medium);
}

@media screen and (max-width: 768px) {
  .etoro-selector-country {
    flex-direction: column;
  }
}

/* Kits */
.etoro-kits-area {
  margin-top: var(--wp--preset--spacing--medium);
  display: grid;
  gap: var(--wp--preset--spacing--small);
}

@media screen and (max-width: 768px) {
  .etoro-kits-area {
    grid-template-columns: 1fr;
  }
}

@media screen and (min-width: 769px) {
  .etoro-kits-area {
    grid-template-columns: repeat(3, 1fr);
  }
}

.etoro-kit {
  display: flex;
  flex-direction: column;
  border-radius: var(--wp--custom--radius--small);
  background-color: var(--wp--preset--color--white);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}
.etoro-kit:hover {
  transform: scale(1.05);
}

.etoro-kit h2 {
  margin-bottom: var(--wp--preset--spacing--xx-small);
}

.etoro-kit-image a,
.etoro-kit-image img {
  display: block;
}
.etoro-kit-image img {
  object-fit: cover;
  aspect-ratio: 1.88;
}

.etoro-kit-content {
  flex: auto;
  padding: var(--wp--preset--spacing--x-small) var(--wp--preset--spacing--small);
  text-align: center;
}

.etoro-kit-action {
  padding: var(--wp--preset--spacing--small);
  text-align: center;
}

/* Products */
.etoro-products-list {
  display: flex;
  flex-direction: column;
  gap: var(--wp--preset--spacing--medium);
}

@media screen and (max-width: 768px) {
  .etoro-products-list {
    gap: var(--wp--preset--spacing--large);
  }
}

.etoro-product {
  display: flex;
  align-items: center;
  gap: var(--wp--preset--spacing--small);
}

@media screen and (max-width: 768px) {
  .etoro-product {
    flex-direction: column;
    align-items: stretch;
  }

  .etoro-product-description {
    order: 3;
  }

  .etoro-product-images {
    order: 2;
  }
}

.etoro-kit-title {
  border-bottom: 1px solid var(--wp--preset--color--primary);
  padding-bottom: var(--wp--preset--spacing--medium);
  margin-bottom: var(--wp--preset--spacing--medium);
}

.etoro-product-images {
  flex-shrink: 0;
  display: flex;
  gap: 20px;
}

@media screen and (min-width: 769px) {
  .etoro-product-images {
    flex-direction: column;
    width: 60px;
  }
}

@media screen and (max-width: 768px) {
  .etoro-product-images {
    flex-direction: row;
    justify-content: center;
  }
}

.etoro-product-images img {
  width: 60px;
  object-fit: cover;
  aspect-ratio: 1;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.16);
}

.etoro-product-image {
  flex-shrink: 0;
  max-width: 400px;
  height: auto;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
}

@media screen and (max-width: 768px) {
  .etoro-product-image {
    order: 1;
    max-width: 100%;
  }
}

.etoro-product-image img,
.etoro-product-images img {
  display: block;
  cursor: zoom-in;
}

.etoro-product-images a:first-child {
  grid-column: 1 / span 4;
}

.etoro-product-description {
  flex: auto;
  padding-left: var(--wp--preset--spacing--medium);
  padding-right: var(--wp--preset--spacing--large);
  font-size: var(--wp--preset--font-size--medium);
}

@media screen and (max-width: 768px) {
  .etoro-product-description {
    padding: 0;
    width: auto;
  }

  .etoro-product-description hr {
    display: none;
  }
}

.etoro-product-description hr {
  border: 0;
  border-top: 1px solid #9999a6;
  margin: var(--wp--preset--spacing--small) 0;
}

.etoro-product-attributes {
  display: flex;
  align-items: baseline;
  gap: var(--wp--preset--spacing--x-small);
}

.etoro-product-attributes label {
  border-radius: var(--wp--custom--radius--full);
  padding: 2px 8px 6px;
  cursor: pointer;
  min-width: 31px;
  text-align: center;
}

.etoro-product-attributes label:has(:checked) {
  background-color: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--white);
}

.etoro-product-attributes label:has(:disabled) {
  opacity: 0.2;
}

.etoro-product-attributes label:not(:has(:checked, :disabled)):hover {
  color: var(--wp--preset--color--secondary-alt);
}

.etoro-product-attributes input[type="radio"] {
  display: none;
}

.etoro-product-attributes-label {
  font-weight: 700;
  margin: 0;
}

.etoro-product-variations {
  display: flex;
  align-items: baseline;
  gap: var(--wp--preset--spacing--x-small);
}

.etoro-product-variations-checkbox {
  display: none;
}

.etoro-product-variations label {
  border: 1px solid var(--wp--preset--color--primary);
  border-radius: var(--wp--custom--radius--full);
  padding: 2px 8px 6px;
  font-size: var(--wp--preset--font-size--base);
  cursor: pointer;
}

.etoro-product-variations label:has(:checked) {
  background: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--white);
}

.etoro-product-variations label:has(:disabled) {
  opacity: 0.2;
}

.etoro-product-variations label:not(:has(:checked, :disabled)):hover {
  border-color: var(--wp--preset--color--secondary-alt);
  color: var(--wp--preset--color--secondary-alt);
}

.etoro-product-no-option {
  font-size: 0.8em;
  font-style: italic;
}

/* Modal */
.etoro-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background-color: rgba(0, 0, 0, 0.8);
}

.etoro-modal-content {
  flex: 1;
  justify-content: stretch;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

.etoro-modal-close {
  position: fixed;
  top: 0;
  right: 20px;
  color: white;
  padding: var(--wp--preset--spacing--xx-small);
  font-size: 1.8em;
  line-height: 1;
  cursor: pointer;
  background-color: rgba(0, 0, 0, 0.5);
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
}

.etoro-modal-next,
.etoro-modal-prev {
  position: fixed;
  width: 30px;
  height: 30px;
  padding: var(--wp--preset--spacing--small);
  top: calc(50% - 10px);
  color: white;
  cursor: pointer;
  background-color: rgba(0, 0, 0, 0.5);
  background-repeat: no-repeat;
  background-size: contain;
  color: white;
}

.etoro-modal-next {
  right: 0;
  background-image: url("data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiAgd2lkdGg9IjI0IiAgaGVpZ2h0PSIyNCIgIHZpZXdCb3g9IjAgMCAyNCAyNCIgIGZpbGw9Im5vbmUiICBzdHJva2U9IndoaXRlIiAgc3Ryb2tlLXdpZHRoPSIyIiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiAgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgIGNsYXNzPSJpY29uIGljb24tdGFibGVyIGljb25zLXRhYmxlci1vdXRsaW5lIGljb24tdGFibGVyLWNoZXZyb24tcmlnaHQiPjxwYXRoIHN0cm9rZT0ibm9uZSIgZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPjxwYXRoIGQ9Ik05IDZsNiA2bC02IDYiIC8+PC9zdmc+");
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
}

.etoro-modal-prev {
  left: 0;
  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IndoaXRlIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgY2xhc3M9Imljb24gaWNvbi10YWJsZXIgaWNvbnMtdGFibGVyLW91dGxpbmUgaWNvbi10YWJsZXItY2hldnJvbi1sZWZ0Ij4KICA8cGF0aCBzdHJva2U9Im5vbmUiIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiIC8+CiAgPHBhdGggZD0iTTE1IDZsLTYgNmw2IDYiIC8+Cjwvc3ZnPg==");
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
}

/* Thank you page */
.wc-block-order-confirmation-totals__product a {
  text-decoration: none !important;
  cursor: default !important;
  color: var(--wp--preset--color--primary) !important;
}

.wc-block-order-confirmation-billing-wrapper {
  display: none !important;
}

.wp-site-blocks {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.wp-block-post-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.wp-block-post-content > header {
  flex: auto;
}

/* Error */

.etoro-error {
  color: #e11d48;
  font-weight: 500;
  font-size: var(--wp--preset--font-size--base);
}

.etoro-hidden {
  display: none;
}
