/**
 * RadhaMadhav - Main Stylesheet
 * Design matching the listing page
 */

:root {
  /* Color System */
  --blue: #1a53d6;
  --blue-light: #eaf0ff;
  --soft: #f6f6f6;
  --muted: #888;
  --card-border: #e6e6e6;
  --text-dark: #222;
  --text-light: #777;
  --white: #fff;
  --gray-light: #ddd;
  --gray: #666;
  
  /* Typography */
  --font-primary: Arial, Helvetica, sans-serif;
  --font-size-base: 16px;
  --line-height-base: 1.6;
  
  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  
  /* Border Radius */
  --border-radius: 8px;
  --border-radius-sm: 6px;
}

/* Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-primary);
  background: var(--white);
  color: var(--text-dark);
  line-height: var(--line-height-base);
}

/* Header Styles matching listing design */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: #fafafa;
  border-bottom: 1px solid #e6e6e6;
  z-index: 1200;
  display: flex;
  align-items: center;
}

.header-inner {
  width: 100%;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.peace {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(180deg, #6a2fb6, #582a93);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
}

.custom-logo img {
  border-radius: 8px;
}

.controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.location-text {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
}

.change-link {
  color: var(--blue);
  cursor: pointer;
  font-size: 14px;
}

.change-link:hover {
  text-decoration: underline;
}

.header-right {
  margin-left: auto;
  display: flex;
  gap: 0px;
  align-items: center;
  padding-right: 8px;
}

.icon-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 13px;
  color: #333;
  cursor: pointer;
}

.icon-stack i {
  font-size: 18px;
  margin-bottom: 2px;
}

.icon-stack:hover {
  color: var(--blue);
}

/* Button Styles matching listing design */
button,
.btn,
input[type="button"],
input[type="reset"],
input[type="submit"],
.wp-block-button__link {
  background: var(--white);
  border: 1px solid var(--gray-light);
  padding: 8px 12px;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s ease;
  display: inline-block;
  text-align: center;
  text-decoration: none;
  color: inherit;
}

button:hover,
.btn:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover {
  background: var(--soft);
  border-color: var(--gray);
}

button:focus,
.btn:focus,
input[type="button"]:focus,
input[type="reset"]:focus,
input[type="submit"]:focus {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.btn.active {
  background: var(--blue-light);
  border-color: var(--blue);
  color: var(--blue);
}

/* Primary Button */
.button-primary,
input[type="submit"] {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

.button-primary:hover,
input[type="submit"]:hover {
  background: #1646c0;
  border-color: #1646c0;
}

/* Form Elements */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
textarea,
select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--gray-light);
  border-radius: var(--border-radius);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--blue);
}

/* Main Content */
.site-content {
  margin-top: 80px;
  padding: 20px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* Posts Grid (matching listing design) */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.post-card {
  background: var(--white);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  padding: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.post-card h3 {
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 1.4;
}

.post-card h3 a {
  color: var(--text-dark);
  text-decoration: none;
}

.post-card h3 a:hover {
  color: var(--blue);
}

.post-meta {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.post-excerpt {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.5;
}

/* Navigation */
.primary-menu {
  display: flex;
  list-style: none;
  gap: 24px;
  margin: 0;
  padding: 0;
}

.primary-menu a {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 0;
  transition: color 0.2s ease;
}

.primary-menu a:hover,
.primary-menu .current-menu-item a {
  color: var(--blue);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

/* Footer */
.site-footer {
  background: var(--soft);
  border-top: 1px solid var(--card-border);
  margin-top: 40px;
  padding: 40px 20px;
}

.site-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
  .header-inner {
    padding: 8px;
  }
  
  .location-text span:first-child {
    display: none;
  }
  
  .header-right {
    gap: 0px;
  }
  
  .icon-stack div {
    display: none;
  }
  
  .icon-stack i {
    font-size: 20px;
    margin-bottom: 0;
  }
  
  .site-content {
    margin-top: 70px;
    padding: 12px;
  }
  
  .posts-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .primary-menu {
    flex-direction: column;
    gap: 0;
  }
  
  .menu-toggle {
    display: block;
  }
}

/* Customizer Range Input Styling */
.customize-control-range input[type="range"] {
  width: 100%;
  margin: 10px 0;
}

/* Chip buttons like in listing page */
.chip {
  background: var(--white);
  border: 1px solid var(--gray-light);
  padding: 8px 12px;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.chip.active {
  background: var(--blue-light);
  border-color: var(--blue);
  color: var(--blue);
}

.chip:hover {
  background: var(--soft);
}














/* Profile Dropdown Styles */
.profile-dropdown {
    position: relative;
}

.profile-trigger {
    cursor: pointer;
    position: relative;
    padding-right: 20px;
}

.profile-trigger .dropdown-arrow {
    font-size: 10px;
    margin-left: 4px;
    transition: transform 0.3s ease;
}

.profile-trigger.active .dropdown-arrow {
    transform: rotate(180deg);
}

.profile-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 280px;
    background: var(--white);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.profile-dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-header {
    padding: 20px;
    border-bottom: 1px solid var(--card-border);
    background: var(--soft);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.user-avatar {
    float: left;
    margin-right: 12px;
}

.user-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info {
    overflow: hidden;
}

.user-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.user-email {
    font-size: 12px;
    color: var(--muted);
}

.profile-links {
    padding: 8px 0;
}

.profile-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 14px;
}

.profile-link:hover {
    background: var(--blue-light);
    color: var(--blue);
}

.profile-link i {
    width: 20px;
    margin-right: 12px;
    font-size: 14px;
    text-align: center;
}

.profile-link.logout {
    border-top: 1px solid var(--card-border);
    margin-top: 8px;
    padding-top: 16px;
    color: #dc3545;
}

.profile-link.logout:hover {
    background: #fee;
    color: #dc3545;
}

/* Mobile responsive for profile dropdown */
@media (max-width: 768px) {
    .profile-dropdown-menu {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .profile-trigger div {
        display: none;
    }
    
    .profile-trigger .dropdown-arrow {
        display: none;
    }
}

/* HivePress specific styles */
.hivepress-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.hp-page__title {
    color: var(--text-dark);
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 600;
}

/* Notification badge */
.icon-stack {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--blue);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}










/* Header Right Icons - Show text below each icon */
.header-right {
    margin-left: auto;
    display: flex;
    gap: 0px;
    align-items: center;
    padding-right: 8px;
}

.icon-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s ease;
    padding: 0px 0px;
    border-radius: 4px;
}

.icon-stack:hover {
    color: var(--blue);
    background: var(--soft);
}

.icon-stack i {
    font-size: 20px;
    margin-bottom: 4px;
}

.icon-stack div {
    line-height: 1.2;
    font-weight: 500;
}

/* Profile Dropdown - No Arrow */
.profile-dropdown {
    position: relative;
}

.profile-trigger {
    cursor: pointer;
    position: relative;
}

.profile-trigger .dropdown-arrow {
    display: none; /* Remove dropdown arrow */
}

.profile-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 280px;
    background: var(--white);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 8px;
}

.profile-dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Guest Header Styles */
.guest-header {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.guest-icon {
    width: 40px;
    height: 40px;
    background: var(--blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.profile-header {
    padding: 20px;
    border-bottom: 1px solid var(--card-border);
    background: var(--soft);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.user-avatar {
    float: left;
    margin-right: 12px;
}

.user-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info {
    overflow: hidden;
}

.user-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 2px;
    font-size: 14px;
}

.user-email {
    font-size: 12px;
    color: var(--muted);
}

.profile-links {
    padding: 8px 0;
}

.profile-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 14px;
}

.profile-link:hover {
    background: var(--blue-light);
    color: var(--blue);
}

.profile-link i {
    width: 20px;
    margin-right: 12px;
    font-size: 14px;
    text-align: center;
}

.profile-link.logout {
    border-top: 1px solid var(--card-border);
    margin-top: 8px;
    padding-top: 16px;
    color: #dc3545;
}

.profile-link.logout:hover {
    background: #fee;
    color: #dc3545;
}

/* Login redirect notice */
.login-redirect-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 12px;
    border-radius: 4px;
    margin: 10px 0;
    text-align: center;
    font-size: 14px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .header-right {
        gap: 0px;
    }
    
    .icon-stack {
        padding: 0px 0px;
    }
    
    .icon-stack i {
        font-size: 18px;
    }
    
    .icon-stack div {
        font-size: 11px;
    }
    
    .profile-dropdown-menu {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
}

/* Ensure all header icons have consistent styling */
#savedLink, #alertsLink, #postLink, #profileTrigger {
    min-width: 40px;
    text-align: center;
}

/* Hover effects for better UX */
.icon-stack:hover i {
    transform: translateY(-1px);
}

.icon-stack i {
    transition: transform 0.2s ease;
}






/* Mobile Responsive - Show same header-right as desktop */
@media (max-width: 768px) {
    .header-right {
        gap: 0px;
    }
    
    
    
    .icon-stack i {
        font-size: 18px;
    }
    
    .icon-stack div {
        font-size: 11px;
        display: block !important; /* Force show text on mobile */
        line-height: 1.2;
    }
    
    .profile-dropdown-menu {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    /* Ensure header doesn't overflow on mobile */
    .header-inner {
        padding: 8px;
        flex-wrap: nowrap;
    }
    
    .logo {
        min-width: auto;
    }
    
    .location-text span:first-child {
        display: inline !important; /* Show location text on mobile */
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .header-right {
        gap: 0px;
    }
    
    .icon-stack {
        padding: 0px 0px;
        min-width: 0px;
    }
    
    .icon-stack div {
        font-size: 10px;
    }
    
    .location-text span:first-child {
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* Location Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 50px rgba(0,0,0,0.3);
    z-index: 10000;
    max-width: 900px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: var(--text-dark);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--muted);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--text-dark);
}

.location-container {
    display: flex;
    height: 500px;
}

.location-sidebar {
    width: 300px;
    border-right: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
}

.location-country {
    padding: 16px 20px;
    background: var(--blue-light);
    color: var(--blue);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--card-border);
}

.location-country i {
    font-size: 16px;
}

.states-list {
    flex: 1;
    overflow-y: auto;
}

.state-item {
    padding: 12px 20px;
    border-bottom: 1px solid var(--card-border);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.state-item:hover {
    background: var(--soft);
}

.state-item.active {
    background: var(--blue-light);
    color: var(--blue);
    font-weight: 500;
}

.location-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.selected-location-display {
    padding: 16px 24px;
    border-bottom: 1px solid var(--card-border);
    background: var(--soft);
}

.selected-location-display h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: var(--muted);
    font-weight: 500;
}

#selectedLocationDisplay {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 16px;
}

.cities-list {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    align-content: start;
}

.city-item {
    padding: 12px 16px;
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-size: 14px;
}

.city-item:hover {
    border-color: var(--blue);
    background: var(--blue-light);
}

.city-item.active {
    background: var(--blue);
    color: white;
    border-color: var(--blue);
}

/* Scrollbar styling */
.states-list::-webkit-scrollbar,
.cities-list::-webkit-scrollbar {
    width: 6px;
}

.states-list::-webkit-scrollbar-track,
.cities-list::-webkit-scrollbar-track {
    background: var(--soft);
}

.states-list::-webkit-scrollbar-thumb,
.cities-list::-webkit-scrollbar-thumb {
    background: var(--gray-light);
    border-radius: 3px;
}

.states-list::-webkit-scrollbar-thumb:hover,
.cities-list::-webkit-scrollbar-thumb:hover {
    background: var(--muted);
}

/* Mobile responsive for location modal */
@media (max-width: 768px) {
    .modal {
        padding: 10px;
    }
    
    .modal-content {
        max-height: 90vh;
    }
    
    .location-container {
        flex-direction: column;
        height: 600px;
    }
    
    .location-sidebar {
        width: 100%;
        height: 200px;
        border-right: none;
        border-bottom: 1px solid var(--card-border);
    }
    
    .cities-list {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 8px;
        padding: 16px;
    }
}







/* Notification Badge Styles */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Make sure icon-stack has relative positioning for badge */
.icon-stack {
    position: relative;
}

/* Profile dropdown link styles */
.profile-link.your-listings {
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 16px;
    margin-bottom: 8px;
    font-weight: 600;
}

.profile-link.your-listings:hover {
    background: var(--blue-light);
    color: var(--blue);
}


















/* Profile Dropdown Debug Styles */
.profile-dropdown {
    position: relative;
    display: block !important; /* Force display */
}

.profile-trigger {
    cursor: pointer;
    position: relative;
    display: flex !important; /* Force display */
}

.profile-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 280px;
    background: #ffffff;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 8px;
    display: block !important; /* Force display */
}

.profile-dropdown-menu.active {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    display: block !important;
}

/* Make sure the dropdown is above other elements */
.profile-dropdown-menu {
    z-index: 9999 !important;
}

/* Profile header styles */
.profile-header {
    padding: 20px;
    border-bottom: 1px solid #e6e6e6;
    background: #f6f6f6;
    border-radius: 8px 8px 0 0;
}

.user-avatar {
    float: left;
    margin-right: 12px;
}

.user-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info {
    overflow: hidden;
}

.user-name {
    font-weight: 600;
    color: #222;
    margin-bottom: 2px;
    font-size: 14px;
}

.user-email {
    font-size: 12px;
    color: #888;
}

.profile-links {
    padding: 8px 0;
}

.profile-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #222;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 14px;
}

.profile-link:hover {
    background: #eaf0ff;
    color: #1a53d6;
}

.profile-link i {
    width: 20px;
    margin-right: 12px;
    font-size: 14px;
    text-align: center;
}

/* Force show on mobile */
@media (max-width: 768px) {
    .profile-dropdown-menu {
        position: fixed !important;
        top: 60px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
    }
}