/*
Theme Name: Smart Hodl
Theme URI:
Author: Smart Hodl Team
Author URI:
Description: Custom theme for Smart Hodl WordPress site - Automated crypto portfolio management
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: smart-hodl
*/

/* Base styles */
html {
  overflow-x: hidden;
}

body {
  background-color: #0b0b0b;
  color: white;
}

.bg-bgCard.opacity-Bg {
  --tw-bg-opacity: 0.3;
}

.gradient-text {
  background: linear-gradient(90deg, #ffffff 0%, #8b959e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.glow-effect {
  box-shadow: 0 0 40px rgba(0, 213, 75, 0.15);
}

.card-gradient {
  background: linear-gradient(145deg, #161616 0%, #0f0f0f 100%);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.accent-green {
  color: #00d54b;
}

.screenshot-box {
  background: #050505;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.screenshot-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.screenshot-box:hover img {
  opacity: 1;
}

/* Range input styling */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: #374151;
  border-radius: 9999px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #00d54b;
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #00d54b;
  cursor: pointer;
  border: none;
}

/* WordPress specific overrides */
.wp-block-navigation a {
  color: #d1d5db;
}

.wp-block-navigation a:hover {
  color: white;
}

/* ==========================================================================
   WooCommerce Styles - Dark Theme
   ========================================================================== */

/* General WooCommerce */
.woocommerce-page {
  background-color: #0b0b0b;
  background-color: black;
}

.woocommerce-product-details__short-description {
  margin-bottom: 2rem;
}

.woocommerce-product-details__short-description ul {
  padding-left: 1rem;
}

.woocommerce-product-details__short-description li {
  margin-left: 1rem;
  list-style: circle;
}

.woocommerce div.product .product_title,
.woocommerce:where(body:not(.woocommerce-uses-block-theme))
  div.product
  p.price {
  font-size: 4.5rem;
  line-height: 1;
  font-weight: 900;
  font-family: Inter, sans-serif;
  margin-bottom: 1rem;
  letter-spacing: -0.025em;
}

/* Forms */
.woocommerce form .form-row {
  margin-bottom: 1rem;
}

.woocommerce form .form-row label {
  display: block;
  margin-bottom: 0.5rem;
  color: #8b959e;
  font-size: 0.875rem;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce input[type="text"],
.woocommerce input[type="email"],
.woocommerce input[type="password"],
.woocommerce input[type="tel"],
.woocommerce input[type="number"],
.woocommerce select,
.woocommerce textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  color: white;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce input[type="text"]:focus,
.woocommerce input[type="email"]:focus,
.woocommerce input[type="password"]:focus,
.woocommerce select:focus,
.woocommerce textarea:focus {
  outline: none;
  border-color: #00d54b;
}

.woocommerce form .form-row input.input-text::placeholder {
  color: #6b7280;
}

/* Buttons */
.woocommerce button.button,
.woocommerce input.button,
.woocommerce a.button,
.woocommerce .button {
  background: #00d54b;
  color: black;
  border: none;
  border-radius: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.2s;
  text-decoration: none;
  display: inline-block;
}

.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce a.button:hover,
.woocommerce .button:hover {
  background: #00b53f;
  color: black;
}

.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce a.button.alt {
  background: #00d54b;
  color: black;
}

.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover,
.woocommerce a.button.alt:hover {
  background: #00b53f;
}

/* My Account Navigation */
.woocommerce-MyAccount-navigation {
  background: #191919;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 1rem;
  margin-bottom: 2rem;
}

.woocommerce-MyAccount-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.woocommerce-MyAccount-navigation ul li {
  margin: 0;
  padding: 0;
}

.woocommerce-MyAccount-navigation ul li a {
  display: block;
  padding: 0.75rem 1rem;
  color: #8b959e;
  text-decoration: none;
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.woocommerce-MyAccount-navigation ul li a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

.woocommerce-MyAccount-navigation ul li.is-active a {
  background: rgba(0, 213, 75, 0.1);
  color: #00d54b;
  font-weight: 600;
}

/* My Account Content */
.woocommerce-MyAccount-content {
  background: #191919;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 2rem;
}

.woocommerce-MyAccount-content p {
  color: #8b959e;
}

.woocommerce-MyAccount-content a {
  color: #00d54b;
  text-decoration: none;
}

.woocommerce-MyAccount-content a:hover {
  color: #00b53f;
}

/* Login/Register Forms */
.woocommerce-form-login,
.woocommerce-form-register {
  background: #191919;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 2rem;
}

.woocommerce form.login,
.woocommerce form.register {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
}

.woocommerce .col2-set:not(.addresses) .col-1,
.woocommerce .col2-set:not(.addresses) .col-2 {
  max-width: 100%;
}

@media (min-width: 768px) {
  .woocommerce .col2-set:not(.addresses) {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .woocommerce .col2-set:not(.addresses) .col-1,
  .woocommerce .col2-set:not(.addresses) .col-2 {
    width: 100%;
    float: none;
  }
}

/* Remember me checkbox */
.woocommerce form .form-row.woocommerce-form-login__rememberme {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.woocommerce
  form
  .form-row.woocommerce-form-login__rememberme
  input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
}

/* Lost password link */
.woocommerce .woocommerce-LostPassword {
  margin-top: 1rem;
}

.woocommerce .woocommerce-LostPassword a {
  color: #8b959e;
  font-size: 0.875rem;
}

.woocommerce .woocommerce-LostPassword a:hover {
  color: white;
}

/* Tables */
.woocommerce table.shop_table {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  background: #191919;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}

.woocommerce table.shop_table th {
  background: rgba(0, 0, 0, 0.3);
  color: #8b959e;
  font-weight: 600;
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.woocommerce table.shop_table td {
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: white;
}

.woocommerce table.shop_table tr:last-child td {
  border-bottom: none;
}

/* Notices */
.woocommerce-message,
.woocommerce-info {
  background: rgba(0, 213, 75, 0.1);
  border: 1px solid rgba(0, 213, 75, 0.3);
  border-radius: 0.5rem;
  padding: 1rem 1.5rem 1rem 3.5rem;
  color: #00d54b;
  margin-bottom: 1.5rem;
  position: relative;
  display: flex;
  align-items: center;
  min-height: 3.5rem;
  gap: 1rem;
}

.woocommerce-message::before,
.woocommerce-info::before {
  color: #00d54b;
  position: absolute;
  top: 50%;
  left: 1.25rem;
  transform: translateY(-50%);
}

.woocommerce-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 0.5rem;
  padding: 1rem 1.5rem 1rem 3.5rem;
  color: #ef4444;
  margin-bottom: 1.5rem;
  list-style: none;
  position: relative;
}

.woocommerce-error::before {
  color: #ef4444;
  position: absolute;
  top: 1rem;
  left: 1.25rem;
}

.woocommerce-error li {
  color: #ef4444;
}

/* Dashboard greeting */
.woocommerce-MyAccount-content > p:first-child {
  font-size: 1.125rem;
  color: white;
  margin-bottom: 1.5rem;
}

/* Order details */
.woocommerce-order-details,
.woocommerce-customer-details {
  margin-top: 2rem;
}

.woocommerce-order-details h2,
.woocommerce-customer-details h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Addresses */
.woocommerce-Addresses.col2-set,
.woocommerce .col2-set.addresses {
  display: flex !important;
  flex-wrap: wrap;
  gap: 1.5rem;
  width: 100% !important;
}

.woocommerce-Addresses.col2-set::after,
.woocommerce .col2-set.addresses::after {
  display: none !important;
}

.woocommerce-Addresses .woocommerce-Address,
.woocommerce .col2-set.addresses .col-1,
.woocommerce .col2-set.addresses .col-2 {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  padding: 1.5rem;
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  margin: 0 !important;
  flex: 1 1 100%;
}

.woocommerce-Addresses .woocommerce-Address-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.woocommerce-Addresses .woocommerce-Address-title h2,
.woocommerce-Addresses .woocommerce-Address-title h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.woocommerce-Addresses .woocommerce-Address-title .edit {
  color: #00d54b;
  font-size: 0.875rem;
}

.woocommerce-Addresses address {
  color: #8b959e;
  font-style: normal;
}

/* My Account Navigation - remove default margins */
.woocommerce-MyAccount-navigation {
  margin-bottom: 0;
}

/* My Account Navigation - Mobile Responsive Dropdown */
@media (max-width: 768px) {
  .woocommerce-MyAccount-navigation {
    position: relative;
  }

  .woocommerce-MyAccount-navigation ul {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
  }

  .woocommerce-MyAccount-navigation.is-expanded ul {
    max-height: 500px;
    transition: max-height 0.3s ease-in;
  }

  /* Active item always visible as the toggle trigger */
  .woocommerce-MyAccount-navigation ul li.is-active {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    background: #191919;
    border-radius: 0.75rem;
  }

  .woocommerce-MyAccount-navigation.is-expanded ul li.is-active {
    position: relative;
  }

  /* Add padding top to ul to make room for absolute positioned active item */
  .woocommerce-MyAccount-navigation ul {
    padding-top: 1rem;
  }

  .woocommerce-MyAccount-navigation.is-expanded ul {
    padding-top: 0;
  }

  /* Dropdown arrow indicator */
  .woocommerce-MyAccount-navigation ul li.is-active a {
    position: relative;
    padding-right: 2.5rem;
  }

  .woocommerce-MyAccount-navigation ul li.is-active a::after {
    content: "";
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #00d54b;
    transition: transform 0.2s;
  }

  .woocommerce-MyAccount-navigation.is-expanded ul li.is-active a::after {
    transform: translateY(-50%) rotate(180deg);
  }

  /* Mobile toggle trigger - the whole nav area */
  .woocommerce-MyAccount-navigation .mobile-nav-toggle {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    cursor: pointer;
  }

  .woocommerce-MyAccount-navigation.is-expanded .mobile-nav-toggle {
    display: none;
  }

  /* Content area padding on mobile */
  .woocommerce-MyAccount-content {
    padding: 2rem 0.5rem;
    margin-top: 0.5rem;
  }

  /* Dashboard total allocation spacing on mobile */
  #dashboard-total-allocation {
    margin-top: 5rem;
  }

  /* Modal content overflow on mobile */
  #modal-content .space-y-3 {
    overflow-x: hidden;
  }
}

/* Product styles (basic) */
.woocommerce ul.products li.product {
  background: #191919;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 1rem;
  transition: border-color 0.2s;
}

.woocommerce ul.products li.product:hover {
  border-color: rgba(0, 213, 75, 0.5);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  color: white;
  font-size: 1rem;
  font-weight: 600;
}

.woocommerce ul.products li.product .price {
  color: #00d54b;
  font-weight: 700;
}

/* Cart page */
.woocommerce-cart-form {
  background: #191919;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 1.5rem;
}

.woocommerce .cart-collaterals .cart_totals {
  background: #191919;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 1.5rem;
}

/* Checkout */
.woocommerce-checkout #payment {
  background: #191919;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
}

.woocommerce-checkout #payment ul.payment_methods {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem;
}

.woocommerce-checkout #payment div.payment_box {
  background: rgba(0, 0, 0, 0.3);
  color: #8b959e;
}

/* Quantity input */
.woocommerce .quantity .qty {
  width: 60px;
  text-align: center;
}

/* Remove button */
.woocommerce a.remove {
  color: #ef4444 !important;
  font-size: 1.5rem;
  font-weight: 400;
}

.woocommerce a.remove:hover {
  background: transparent;
  color: #dc2626 !important;
}

/* Thank you page */
.woocommerce-notice.woocommerce-notice--success.woocommerce-thankyou-order-received {
  padding-bottom: 2rem;
}

.woocommerce ul.order_details li {
  padding-right: 1rem;
  margin-right: 1em;
}

/* External link icon for links with target="_blank" */
a[target="_blank"]:not(.no-external-icon)::after {
  content: "";
  display: inline-block;
  width: 0.75em;
  height: 0.75em;
  margin-left: 0.25em;
  vertical-align: middle;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M10 5H8.2C7.08 5 6.52 5 6.09 5.22C5.72 5.41 5.41 5.72 5.22 6.09C5 6.52 5 7.08 5 8.2V15.8C5 16.92 5 17.48 5.22 17.91C5.41 18.28 5.72 18.59 6.09 18.78C6.52 19 7.08 19 8.2 19H15.8C16.92 19 17.48 19 17.91 18.78C18.28 18.59 18.59 18.28 18.78 17.91C19 17.48 19 16.92 19 15.8V14M20 9V4M20 4H15M20 4L13 11' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M10 5H8.2C7.08 5 6.52 5 6.09 5.22C5.72 5.41 5.41 5.72 5.22 6.09C5 6.52 5 7.08 5 8.2V15.8C5 16.92 5 17.48 5.22 17.91C5.41 18.28 5.72 18.59 6.09 18.78C6.52 19 7.08 19 8.2 19H15.8C16.92 19 17.48 19 17.91 18.78C18.28 18.59 18.59 18.28 18.78 17.91C19 17.48 19 16.92 19 15.8V14M20 9V4M20 4H15M20 4L13 11' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

/* Hide external icon for image links and buttons */
a[target="_blank"]:has(img)::after,
a[target="_blank"].button::after,
a[target="_blank"].btn::after,
a[target="_blank"][class*="button"]::after,
a[target="_blank"][class*="btn"]::after {
  display: none;
}

#initial_investment,
#recurring_investment,
#edit_initial_investment,
#edit_recurring_investment,
#target_amount {
  padding-left: 2rem;
}

/* ==========================================================================
   Financial Goals Calculator
   ========================================================================== */

.financial-goals-calculator .step-hidden {
  display: none;
}

.financial-goals-calculator .answer-btn {
  transition: all 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.3);
}

.financial-goals-calculator .answer-btn:hover {
  border-color: #00d54b;
  background: rgba(0, 213, 75, 0.1);
}

.financial-goals-calculator .tab-active {
  border-bottom: 2px solid #00d54b;
  color: #00d54b;
}

.financial-goals-calculator .calc-glass {
  background: rgba(25, 25, 25, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.financial-goals-calculator .calc-input-dark {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
}

.financial-goals-calculator .calc-input-dark:focus {
  border-color: #00d54b;
}

.financial-goals-calculator .calc-input-dark::placeholder {
  color: #6b7280;
}

/* Email popup overlay */
#email-popup {
  backdrop-filter: blur(8px);
}

/* Explanation tooltip */
#explain-tooltip {
  animation: tooltipFadeIn 0.2s ease-out;
}

#explain-tooltip::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 20px;
  width: 12px;
  height: 12px;
  background: #1e293b;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transform: rotate(45deg);
}

@keyframes tooltipFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Cinematic Intro Animations
   ========================================================================== */

/* Initial state - hidden */
.intro-slide {
  opacity: 0;
  transform: translateY(30px);
  filter: blur(8px);
  transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Visible state - fade in */
.intro-slide-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* Exit state - fade out upward */
.intro-slide-exit {
  opacity: 0;
  transform: translateY(-30px);
  filter: blur(8px);
}

/* Progress dots */
.intro-dot {
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Intro overlay background */
#intro-overlay {
  background: linear-gradient(135deg, #0a0a0a 0%, #111111 50%, #0a0a0a 100%);
}

/* Subtle background animation */
#intro-overlay::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center, rgba(0, 213, 75, 0.03) 0%, transparent 70%);
  animation: introGlow 4s ease-in-out infinite alternate;
}

@keyframes introGlow {
  0% {
    opacity: 0.3;
    transform: scale(1);
  }
  100% {
    opacity: 0.6;
    transform: scale(1.1);
  }
}
