/*
Theme Name: Debauched Tea Party
Theme URI: https://debauchedtea.party
Author: Debauched Tea Party
Author URI: https://debauchedtea.party
Description: A modern WordPress theme for Debauched Tea Party with radio player and visualizer support
Version: 1.0.1
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dtp-theme
Tags: custom-background, custom-menu, elementor, radio, visualizer
*/

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: white;
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: 100px;
  position: relative;
}

/* Background Image */
.dtp-background-image {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
  opacity: 0.3;
  transition: opacity 1s ease-in-out;
}

/* Background Overlay with Gradient */
.dtp-background-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 25%, #334155 50%, #475569 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  z-index: 0;
}

.dtp-background-overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 50%), 
              radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Navigation Header */
.dtp-navigation {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  z-index: 1202;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), 0 0 1px rgba(255, 255, 255, 0.1) inset;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Admin bar spacing */
.admin-bar .dtp-navigation {
  top: 32px;
}

@media screen and (max-width: 782px) {
  .admin-bar .dtp-navigation {
    top: 46px;
  }
}

.dtp-nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  max-width: 100%;
}

.dtp-logo-container {
  display: flex;
  align-items: center;
  transition: transform 0.2s ease;
}

.dtp-logo-container:hover {
  transform: scale(1.02);
}

.dtp-logo-link {
  display: inline-block;
  text-decoration: none;
}

.dtp-logo {
  height: 50px;
  margin-right: 20px;
  filter: drop-shadow(0 2px 8px rgba(255, 255, 255, 0.3));
  display: block;
}

/* WordPress Custom Logo Support */
.dtp-logo-container .custom-logo-link {
  display: inline-block;
}

.dtp-logo-container .custom-logo {
  height: 50px;
  width: auto;
  margin-right: 20px;
  filter: drop-shadow(0 2px 8px rgba(255, 255, 255, 0.3));
  display: block;
}

.dtp-main-navigation {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dtp-nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 4px;
}

.dtp-nav-menu li {
  margin: 0;
  padding: 0;
}

.dtp-nav-menu a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 24px;
  border-radius: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  display: block;
}

.dtp-nav-menu a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  border-radius: 2px;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dtp-nav-menu .current-menu-item > a::before,
.dtp-nav-menu a:hover::before {
  width: 80%;
}

.dtp-nav-menu a:hover {
  background-color: rgba(59, 130, 246, 0.1);
  color: white;
  transform: translateY(-1px);
}

.dtp-nav-menu .current-menu-item > a {
  background-color: rgba(59, 130, 246, 0.15);
  color: white;
}

/* Social Icons */
.dtp-social-icons {
  display: flex;
  gap: 4px;
  margin-left: 16px;
  padding-left: 16px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.dtp-social-icon {
  color: rgba(255, 255, 255, 0.7);
  padding: 8px;
  border-radius: 4px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.dtp-social-icon:hover {
  color: white;
  background-color: rgba(59, 130, 246, 0.2);
  transform: translateY(-2px);
}

.dtp-social-icon svg {
  width: 20px;
  height: 20px;
}

/* Hamburger Menu Toggle Button */
.dtp-menu-toggle {
  display: none; /* Hidden on desktop */
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
  z-index: 1203;
  position: relative;
  color: white;
  transition: all 0.3s ease;
}

.dtp-menu-toggle:hover {
  background-color: rgba(59, 130, 246, 0.1);
  border-radius: 4px;
}

.dtp-menu-toggle-icon {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  position: relative;
}

.dtp-menu-toggle-icon span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: white;
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.dtp-menu-toggle[aria-expanded="true"] .dtp-menu-toggle-icon span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.dtp-menu-toggle[aria-expanded="true"] .dtp-menu-toggle-icon span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.dtp-menu-toggle[aria-expanded="true"] .dtp-menu-toggle-icon span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Responsive Design - Tablet and Mobile */
@media screen and (max-width: 1024px) {
  /* Tablet Styles */
  .dtp-nav-container {
    padding: 10px 20px;
  }
  
  .dtp-logo {
    height: 45px;
  }
  
  .dtp-nav-menu a {
    padding: 8px 20px;
    font-size: 0.9rem;
  }
  
  .dtp-social-icons {
    margin-left: 12px;
    padding-left: 12px;
  }
}

@media screen and (max-width: 768px) {
  /* Mobile Styles */
  .dtp-menu-toggle {
    display: block;
  }
  
  .dtp-nav-container {
    padding: 10px 16px;
    flex-wrap: wrap;
  }
  
  .dtp-logo {
    height: 40px;
    margin-right: 12px;
  }
  
  .dtp-main-navigation {
    position: fixed;
    top: 74px; /* Navigation height */
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.98) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    z-index: 1201;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-direction: column;
    align-items: stretch;
  }
  
  /* Hide social icons inside mobile menu */
  .dtp-main-navigation .dtp-social-icons {
    display: none !important;
  }
  
  .admin-bar .dtp-main-navigation {
    top: calc(32px + 74px);
  }
  
  @media screen and (max-width: 782px) {
    .admin-bar .dtp-main-navigation {
      top: calc(46px + 74px);
    }
  }
  
  .dtp-main-navigation[aria-expanded="true"] {
    max-height: 100vh;
    opacity: 1;
    overflow-y: auto;
  }
  
  .dtp-nav-menu {
    flex-direction: column;
    width: 100%;
    padding: 16px;
    gap: 8px;
  }
  
  .dtp-nav-menu li {
    width: 100%;
  }
  
  .dtp-nav-menu a {
    width: 100%;
    padding: 12px 20px;
    text-align: left;
    border-radius: 8px;
    display: block;
  }
  
  .dtp-nav-menu a::before {
    display: none;
  }
  
  /* Hide social icons inside mobile menu */
  .dtp-main-navigation .dtp-social-icons {
    display: none !important;
  }
  
  /* Show social icons on nav bar itself on mobile */
  .dtp-nav-container > .dtp-social-icons {
    display: flex !important;
    margin-left: auto;
    margin-right: 8px;
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  /* Adjust content padding for mobile */
  .site-content,
  #content {
    padding-top: 74px;
  }
  
  .admin-bar .site-content,
  .admin-bar #content {
    padding-top: calc(32px + 74px);
  }
  
  @media screen and (max-width: 782px) {
    .admin-bar .site-content,
    .admin-bar #content {
      padding-top: calc(46px + 74px);
    }
  }
}

@media screen and (max-width: 480px) {
  /* Small Mobile Styles */
  .dtp-nav-container {
    padding: 8px 12px;
  }
  
  .dtp-logo {
    height: 35px;
    margin-right: 8px;
  }
  
  .dtp-nav-menu {
    padding: 12px;
  }
  
  .dtp-nav-menu a {
    padding: 10px 16px;
    font-size: 0.85rem;
  }
  
  /* Social icons on nav bar for small mobile */
  .dtp-nav-container > .dtp-social-icons {
    margin-right: 4px;
    padding-left: 8px;
    gap: 2px;
  }
  
  .dtp-nav-container > .dtp-social-icon {
    padding: 6px;
  }
  
  .dtp-nav-container > .dtp-social-icon svg {
    width: 18px;
    height: 18px;
  }
}

/* Visualizer Canvas - Only present when shortcode is used */
.dtp-visualizer-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

#dtp-visualizer-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: block;
  visibility: visible;
}

/* Visualizer Controls - Top Right (below navigation) */
.dtp-visualizer-controls {
  position: absolute;
  top: calc(74px + 10px); /* Navigation height (12px padding + 50px logo + 12px padding) + 10px gap */
  right: 20px;
  z-index: 10;
  pointer-events: auto;
}

/* Account for admin bar */
.admin-bar .dtp-visualizer-controls {
  top: calc(32px + 74px + 10px); /* Admin bar (32px) + Navigation height + 10px gap */
}

@media screen and (max-width: 782px) {
  .admin-bar .dtp-visualizer-controls {
    top: calc(46px + 74px + 10px); /* Admin bar (46px) + Navigation height + 10px gap */
  }
}

.dtp-visualizer-controls .dtp-visualizer-select {
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  color: #fff;
  padding: 8px 12px;
  font-size: 14px;
  min-width: 200px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dtp-visualizer-controls .dtp-visualizer-select:hover {
  background: rgba(0, 0, 0, 0.9);
  border-color: rgba(255, 255, 255, 0.5);
}

.dtp-visualizer-controls .dtp-visualizer-select:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.dtp-visualizer-controls .dtp-visualizer-select option {
  background: #1a1a1a;
  color: #fff;
}

/* AJAX Navigation Loading Indicator */
.dtp-ajax-loader {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  display: none;
  pointer-events: none;
}

.dtp-ajax-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: dtp-spin 0.8s linear infinite;
}

@keyframes dtp-spin {
  to { transform: rotate(360deg); }
}

body.dtp-ajax-loading {
  cursor: wait;
}

/* Don't block pointer events on Elementor elements - they need to initialize */
body.dtp-ajax-loading *:not(.elementor):not(.elementor *):not(.dtp-ajax-loader):not(.dtp-ajax-loader *) {
  pointer-events: none;
}

/* Allow Elementor elements to receive events during loading */
body.dtp-ajax-loading .elementor,
body.dtp-ajax-loading .elementor *,
body.dtp-ajax-loading #dtp-radio-player,
body.dtp-ajax-loading .dtp-ajax-loader {
  pointer-events: auto !important;
}

/* Site Content */
.site-content {
  position: relative;
  z-index: 2;
  min-height: calc(100vh - 100px);
  padding-top: 80px;
}

.site-main {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
}

/* Single Post Styles */
.dtp-single-post {
  position: relative;
  z-index: 2;
}

.dtp-post-featured-image {
  width: 100%;
  max-width: 100%;
  margin: 0 0 40px 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  position: relative;
}

.dtp-post-featured-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 500px;
  object-position: center;
}

.dtp-post-content-wrapper {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.dtp-post-header {
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dtp-post-title {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 20px 0;
  color: white;
  background: linear-gradient(135deg, #ffffff 0%, #3b82f6 50%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dtp-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

.dtp-post-date {
  display: flex;
  align-items: center;
}

.dtp-post-date time {
  color: rgba(255, 255, 255, 0.7);
}

.dtp-post-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.dtp-post-categories a {
  color: rgba(59, 130, 246, 0.9);
  text-decoration: none;
  padding: 4px 12px;
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  transition: all 0.2s ease;
}

.dtp-post-categories a:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.4);
  color: white;
  transform: translateY(-1px);
}

.dtp-post-content {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 60px;
}

.dtp-post-content p {
  margin-bottom: 1.5rem;
}

.dtp-post-content h2,
.dtp-post-content h3,
.dtp-post-content h4 {
  color: white;
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.dtp-post-content h2 {
  font-size: 2rem;
  background: linear-gradient(135deg, #ffffff 0%, #3b82f6 50%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dtp-post-content h3 {
  font-size: 1.5rem;
}

.dtp-post-content h4 {
  font-size: 1.25rem;
}

.dtp-post-content a {
  color: rgba(59, 130, 246, 0.9);
  text-decoration: none;
  border-bottom: 1px solid rgba(59, 130, 246, 0.3);
  transition: all 0.2s ease;
}

.dtp-post-content a:hover {
  color: white;
  border-bottom-color: rgba(59, 130, 246, 0.6);
}

.dtp-post-content ul,
.dtp-post-content ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
}

.dtp-post-content li {
  margin-bottom: 0.75rem;
}

.dtp-post-content blockquote {
  border-left: 4px solid rgba(59, 130, 246, 0.5);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: rgba(255, 255, 255, 0.8);
}

.dtp-post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 2rem 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.dtp-post-content code {
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 0.9em;
  color: rgba(139, 92, 246, 0.9);
}

.dtp-post-content pre {
  background: rgba(0, 0, 0, 0.4);
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 2rem 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.dtp-post-content pre code {
  background: none;
  padding: 0;
  color: rgba(255, 255, 255, 0.9);
}

.dtp-post-content .page-links {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.dtp-post-content .page-links a {
  display: inline-block;
  padding: 8px 16px;
  margin: 0 4px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.dtp-post-content .page-links a:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.4);
}

/* Post Navigation */
.dtp-post-navigation {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.dtp-post-nav-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.dtp-post-nav-prev,
.dtp-post-nav-next {
  position: relative;
}

.dtp-post-nav-prev a,
.dtp-post-nav-next a {
  display: block;
  padding: 20px;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s ease;
  height: 100%;
}

.dtp-post-nav-prev a:hover,
.dtp-post-nav-next a:hover {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.dtp-post-nav-label {
  display: block;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.dtp-post-nav-title {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  line-height: 1.4;
}

.dtp-post-nav-next {
  text-align: right;
}

.dtp-post-nav-next a {
  text-align: right;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
  .site-main {
    padding: 20px 16px;
  }
  
  .dtp-post-content-wrapper {
    padding: 0;
  }
  
  .dtp-post-title {
    font-size: 2rem;
  }
  
  .dtp-post-content {
    font-size: 1rem;
    line-height: 1.7;
  }
  
  .dtp-post-content h2 {
    font-size: 1.75rem;
  }
  
  .dtp-post-content h3 {
    font-size: 1.35rem;
  }
  
  .dtp-post-nav-links {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .dtp-post-nav-next {
    text-align: left;
  }
  
  .dtp-post-nav-next a {
    text-align: left;
  }
  
  .dtp-post-featured-image img {
    max-height: 300px;
  }
}

@media screen and (max-width: 480px) {
  .dtp-post-title {
    font-size: 1.75rem;
  }
  
  .dtp-post-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .dtp-post-featured-image {
    margin-bottom: 24px;
  }
  
  .dtp-post-featured-image img {
    max-height: 250px;
  }
}

/* Admin bar content spacing */
.admin-bar .site-content {
  padding-top: 112px; /* 80px nav + 32px admin bar */
}

@media screen and (max-width: 782px) {
  .admin-bar .site-content {
    padding-top: 126px; /* 80px nav + 46px admin bar */
  }
}

/* Elementor Compatibility */
.elementor-page {
  position: relative;
  z-index: 2;
}

.elementor-section {
  position: relative;
  z-index: 2;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
}

::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.5);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.7);
}

/* Responsive Navigation */
/* Old responsive styles removed - see new responsive styles below */
