/*
Theme Name: Palkarjodi
Theme URI: https://yourwebsite.com
Author: Your Name
Description: Custom theme for Palkarjodi with user roles Nowra and Nowri.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background: #f9fafb;
    font-family: 'Inter', sans-serif;
}

.left-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pj-logo {
    max-height: 40px;
    object-fit: contain;
}

.user-profile-section {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 20px;
    padding: 0px 0px;
}

.user-profile-section:hover {
    color: #933bce;
}

.profile-container {
    display: flex;
    align-items: center;
}

.user-unique-id {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px;
    transition: color 0.2s ease;
    border: 1px solid #0000001f;
    background-color: #f9fafb;
    color: #020817;
    padding: 0.125rem 0.625rem;
    border-radius: 50px;
}

.user-unique-id:hover {
    color: #933bce;
}

/* Header (.palkar-head) */
.palkar-head {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.palkar-head .left-bar {
    display: flex;
    align-items: center;
}

.palkar-head .left-bar img {
    height: 40px;
}

.palkar-head .header-middle {
    flex: 1;
    display: flex;
    justify-content: center;
}

.palkar-head .search-container {
    position: relative;
    display: flex;
    justify-content: center;
}

.palkar-head .nowri-search-bar {
    background: #f1f5f9;
    border-radius: 20px;
    padding: 5px 10px;
    display: flex;
    align-items: center;
}

.palkar-head .input-wrapper {
    position: relative;
    flex: 1;
}

.palkar-head .nowri-search-bar input[type="text"] {
    border: none;
    background: transparent;
    padding: 8px 70px 8px 8px;
    font-size: 14px;
    width: 100%;
    outline: none;
    color: #333;
    height: 32px;
}

.palkar-head .nowri-search-bar .search-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(80deg, #a855f7, #ec4899);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    height: 28px;
    line-height: 1;
}

.palkar-head .nowri-search-bar .search-btn:hover {
    opacity: 0.9;
}

.palkar-head .nowri-search-bar .loading-icon {
    font-size: 14px;
    color: #6b7280;
    margin-right: 5px;
}

.palkar-head .header-right-hand {
    display: flex;
    align-items: center;
}

.palkar-head .premium-link {
    color: #e38b3e;
    font-size: 16px;
    text-decoration: none;
    margin-right: 12px;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.palkar-head .premium-link .premium-icon img {
    margin-right: 4px;
    width: 20px;
    height: 20px;
}

.palkar-head .premium-link:hover {
    color: #eab308;
}

.palkar-head .profile {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.palkar-head .profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 8px;
}

.palkar-head .profile .name-initial {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    font-weight: bold;
    margin-right: 8px;
    background: #3b82f6;
    color: #fff;
}

.palkar-head .profile .profile-name {
    font-size: 16px;
    color: #333;
    display: flex;
    align-items: center;
}

.palkar-head .profile .drop-img {
    margin-left: 4px;
    width: 12px;
    height: 12px;
    object-fit: contain;
}

.palkar-head .profile-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    width: 200px;
}

.palkar-head .profile-dropdown.active {
    display: block;
}

.palkar-head .profile-dropdown ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.palkar-head .profile-dropdown li {
    padding: 12px 15px;
}

.palkar-head .profile-dropdown li a {
    text-decoration: none;
    color: #333;
    display: block;
    font-size: 14px;
}

.palkar-head .profile-dropdown li:hover {
    background-color: #f1f5f9;
}

/* Hamburger Menu Toggle */
.pj-menu-toggle {
    display: none;
    cursor: pointer;
    margin-right: 10px;
}

.pj-hamburger-icon {
    font-size: 24px;
    color: #333;
}

/* Mobile Sidebar (.pj-mobile-sidebar) */
.pj-mobile-sidebar {
    display: none;
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    max-height: 100vh;
    overflow-y: auto;
    background-color: #fefefe;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2);
    z-index: 1300;
    transition: left 0.3s ease;
    padding: 5px;
}

.pj-mobile-sidebar.active {
    left: 0;
}

.pj-mobile-sidebar .pj-mobile-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #d8d8d8;
}

.pj-mobile-sidebar .pj-mobile-logo {
    width: 50%;
}

.pj-mobile-sidebar .pj-close-sidebar {
    font-size: 24px;
    cursor: pointer;
    color: #333;
}

.pj-mobile-sidebar .pj-mobile-menu {
    list-style: none;
    padding: 12px;
    margin: 0;
}

.pj-mobile-sidebar .pj-mobile-menu li {
    border-bottom: 1px solid #eee;
}

.pj-mobile-sidebar .pj-mobile-menu li a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s ease;
}

.pj-mobile-sidebar .pj-mobile-menu li a img {
    width: 20px;
    height: 20px;
    margin-right: 12px;
}

.pj-mobile-sidebar .pj-mobile-menu li.active a {
    background: linear-gradient(80deg, #a855f7, #ec4899);
    color: #fff;
    border-radius: 6px;
}

.pj-mobile-sidebar .pj-mobile-menu li.active a img {
    filter: brightness(0) invert(1);
}

.pj-mobile-sidebar .pj-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    background: linear-gradient(80deg, #a855f7, #ec4899);
    color: #fff;
    border-radius: 9px;
    font-size: 10px;
    font-weight: 600;
    margin-left: auto;
    padding: 0 6px;
}

/* Desktop Sidebar (.side-header) */
.side-header {
    width: 250px;
    background: #fff;
    position: fixed;
    top: 60px;
    left: 0;
    padding: 20px 10px;
    height: calc(100vh - 60px);
    border-right: 1px solid #6c67673d;
    z-index: 50;
}

.side-header ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.side-header ul li {
    padding: 12px 20px;
    border-radius: 5px;
    margin-bottom: 8px;
    transition: background 0.3s;
}

.side-header ul li a {
    color: #000000;
    text-decoration: none;
    display: flex;
    align-items: center;
    font-size: 16px;
    gap: 12px;
}

.side-header ul li a img {
    margin-right: 10px;
    width: 20px;
    height: 20px;
}

.side-header ul li.active {
    background-color: #e0e7ff;
}

.side-h
eader ul li.active a {
    color: #1e3a8a;
    font-weight: bold;
}

.side-header ul li:hover:not(.active) {
    background-color: #e0e7ff;
}

.side-header ul li:hover a {
    color: #fff;
}

.side-header ul li:hover img {
    filter: brightness(0) invert(1);
}

/* Scratch Win Card (Shared for Mobile and Desktop) */
.scratch-win-card {
    margin: 15px;
    width: 200px;
    height: 100px;
    background: linear-gradient(135deg, #ec4899, #a855f7);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    padding: 10px;
}

.scratch-win-card:hover {
    transform: scale(1.02);
}

.scratch-win-card a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    width: 100%;
    height: 100%;
}

.scratch-win-card .gift-icon img {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    object-fit: contain;
}

.scratch-win-card .scratch-text {
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

.scratch-win-card .scratch-text .title {
    font-size: 16px;
    font-weight: bold;
    line-height: 28px;
}

.scratch-win-card .scratch-text p {
    font-size: 14px;
    margin: 4px 0 0;
    line-height: 1.2;
}

.pj-mobile-sidebar .scratch-win-card {
    padding: 12px 16px;
    border-top: 1px solid #eee;
    margin-top: 10px;
}

/* Jodi Journey Navigation (.jodi-journey-nav) */
.jodi-journey-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #fefefe;
    z-index: 1200;
    box-shadow: 0 -3px 8px rgba(0, 0, 0, 0.08);
}

.jodi-journey-nav .pathway-list {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin: 0;
    padding: 12px 0;
    list-style: none;
}

.jodi-journey-nav .mass-marker {
    flex: 1;
    text-align: center;
}

.jodi-journey-nav .nowra-comman-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
    font-size: 12px;
    transition: color 0.2s ease;
}

.jodi-journey-nav .nowra-comman-link img {
    width: 24px;
    height: 24px;
    margin-bottom: 6px;
    transition: filter 0.2s ease;
}

.jodi-journey-nav .search-icon-link {
    background: linear-gradient(80deg, #a855f7, #ec4899);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    margin: 0 auto;
}

.jodi-journey-nav .search-icon-link img {
    filter: brightness(0) invert(1);
    width: 20px;
    height: 20px;
    margin-bottom: 0;
}

.jodi-journey-nav .mass-marker.active-trail .search-icon-link {
    background: #800080;
}

.jodi-journey-nav .mass-marker.active-trail .search-icon-link img {
    filter: brightness(0) invert(1);
}

.jodi-journey-nav .mass-label {
    display: block;
    letter-spacing: 0.2px;
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
}

.jodi-journey-nav .mass-marker.active-trail .nowra-comman-link {
    background: #ec4899;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.jodi-journey-nav .mass-marker.active-trail .nowra-comman-link img {
    filter: invert(44%) sepia(93%) saturate(750%) hue-rotate(290deg) brightness(95%) contrast(105%);
}

/* Main Content */
.main-content {
    margin-left: 251px;
    padding: 20px 20px 0 20px;
    margin-top: 60px;
}

.nowri-profile-container {
    max-width: 1200px;
    margin: 0 auto;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

/* Global Loader */
.global-loader {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.global-loader .spinner {
    width: 44px;
    height: 44px;
    border: 4px solid transparent;
    border-top: 4px solid #a855f7;
    border-right: 4px solid #ec4899;
    border-radius: 50%;
    animation: spin 0.8s ease-in-out infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Authentication Container */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f5f5f5;
    padding: 20px;
}

.auth-form-wrapper {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h2 {
    color: #6a1b9a;
    font-size: 28px;
    margin-bottom: 10px;
}

.auth-header p {
    color: #666;
    font-size: 16px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #9c27b0;
    outline: none;
    box-shadow: 0 0 0 3px rgba(156, 39, 176, 0.2);
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

.terms-group {
    display: flex;
    align-items: center;
    margin: 25px 0;
}

.terms-group input {
    width: auto;
    margin-right: 10px;
}

.terms-group label {
    margin-bottom: 0;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background-color: #6a1b9a;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #7b1fa2;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.auth-footer a {
    color: #6a1b9a;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-message {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.auth-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.auth-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Prevent background scroll when sidebar is active */
body.sidebar-active {
    overflow: hidden;
}

/* Pagination Styles */
.pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    flex-wrap: wrap;
    gap: 10px;
    font-family: 'Inter', sans-serif;
    width: 100%;
}

.profile-count {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    display: flex;
    align-items: center;
}

.profile-count span {
    background: #f1f5f9;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #ddd;
    display: inline-block;
    line-height: 1.5;
}

.pagination {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.pagination ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline-flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.pagination li {
    display: inline;
}

.pagination a.page-numbers {
    padding: 6px 10px;
    text-decoration: none;
    color: #000;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
    line-height: 1.5;
    min-width: 28px;
    text-align: center;
}

.pagination a.page-numbers:hover {
    background: linear-gradient(80deg, #a855f7, #ec4899);
    color: #fff;
    border-color: transparent;
}

.pagination a.page-numbers:hover .page-number {
    color: #fff;
}

.pagination span.page-numbers {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    display: inline-block;
    line-height: 1.5;
    min-width: 28px;
    text-align: center;
}

.pagination .current {
    background: linear-gradient(80deg, #a855f7, #ec4899);
    color: #fff !important;
    border-color: transparent;
}

.pagination .current .page-number {
    color: #fff !important;
}

.pagination .page-number {
    color: #000;
}

.pagination .prev,
.pagination .next {
    font-weight: 500;
    position: relative;
    padding: 6px 10px 6px 18px;
    min-width: 60px;
    text-align: center;
    color: #000;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.3s ease;
}

.pagination .prev:hover,
.pagination .next:hover {
    background: linear-gradient(80deg, #a855f7, #ec4899);
    color: #fff;
    border-color: transparent;
}

.pagination .prev:before {
    left: 6px;
    transform: translateY(-50%) rotate(-135deg);
}

.pagination .next:after {
    right: 6px;
}

.pagination a.prev:hover:before,
.pagination a.next:hover:after {
    border-color: #fff;
}

.pagination .dots {
    background: none;
    border: none;
    color: #000;
    padding: 6px;
    font-size: 13px;
    line-height: 1.5;
    cursor: default;
}

/* Media Queries */
@media (min-width: 1025px) {
    .jodi-journey-nav {
        display: none;
    }
    .side-header {
        display: block;
    }
    .pj-menu-toggle {
        display: none;
    }
    .pj-mobile-sidebar {
        display: none;
    }
}

@media (min-width: 767px) and (max-width: 1024px) {
    .jodi-journey-nav {
        display: block;
    }
    .palkar-head {
        padding: 10px 15px;
        justify-content: space-between;
    }
    .palkar-head .header-middle,
    .palkar-head .search-container,
    .palkar-head .premium-link {
        display: none;
    }
    .palkar-head .left-bar {
        display: flex;
        align-items: center;
    }
    .palkar-head .profile img {
        width: 36px;
        height: 36px;
    }
    .palkar-head .profile .name-initial {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    .palkar-head .profile .profile-name {
        display: none;
    }
    .palkar-head .profile {
        display: flex;
        align-items: center;
        gap: 8px;
    }
    .palkar-head .profile .drop-img {
        display: inline-block;
        width: 16px;
        height: 16px;
    }
    .main-content {
        margin-left: 0;
        margin-top: 60px;
    }
    .nowra-comman-link {
        font-size: 14px;
    }
    .nowra-comman-link img {
        width: 28px;
        height: 28px;
    }
    .pathway-list {
        padding: 14px 0;
    }
    .global-loader .spinner {
        width: 38px;
        height: 38px;
        border-width: 3px;
    }
}

@media (max-width: 768px) {
    .left-bar {
        gap: 8px;
    }
    .pj-logo {
        max-height: 32px;
    }
    .user-profile-section {
        gap: 8px;
        padding: 5px 10px;
    }
    .user-profile-img, .user-name-initial {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
    .user-unique-id {
        font-size: 12px;
    }
}

@media (max-width: 767px) {
    .side-header {
        display: none;
    }
    .main-content {
        margin-left: 0;
    }
    .palkar-head .profile img {
        width: 34px;
        height: 34px;
    }
    .palkar-head .profile .name-initial {
        width: 34px;
        height: 34px;
        font-size: 16px;
    }
    .palkar-head .profile .profile-name {
        display: none;
    }
    .palkar-head .profile {
        display: flex;
        align-items: center;
        gap: 8px;
    }
    .palkar-head .profile .drop-img {
        display: inline-block;
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .palkar-head {
        padding: 8px 10px;
        justify-content: space-between;
    }
    .palkar-head .left-bar img {
        height: 25px;
    }
    .palkar-head .header-middle,
    .palkar-head .search-container,
    .palkar-head .premium-link {
        display: none;
    }
    .palkar-head .profile img {
        width: 32px;
        height: 32px;
    }
    .palkar-head .profile .name-initial {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    .palkar-head .profile .profile-name {
        display: none;
    }
    .palkar-head .profile {
        display: flex;
        align-items: center;
        gap: 8px;
    }
    .palkar-head .profile .drop-img {
        display: inline-block;
        width: 18px;
        height: 18px;
    }
    
    .palkar-head .profile-dropdown {
        width: 180px;
    }
    .jodi-journey-nav {
        display: block;
    }
    .side-header {
        display: none;
    }
    .pj-menu-toggle {
        display: block;
    }
    .pj-mobile-sidebar {
        display: block;
        height: -webkit-fill-available;
        padding: 0px 10px 0px 10px;
    }
    .nowra-comman-link {
        font-size: 10px;
    }
    .nowra-comman-link img {
        width: 22px;
        height: 22px;
    }
    .pathway-list {
        padding: 14px 0;
    }
    .pj-mobile-menu li a {
        padding: 20px 16px;
        font-size: 13px;
    }
    .pj-mobile-menu li a img {
        width: 18px;
        height: 18px;
        margin-right: 10px;
    }
    .pj-mobile-sidebar .scratch-win-card {
        padding: 10px 16px;
        width: 100%;
        margin: 10px 0;
    }
    .pj-count-badge {
        min-width: 16px;
        height: 16px;
        font-size: 9px;
        padding: 0 5px;
    }
    .pj-mobile-sidebar-header {
        padding: 10px 16px;
    }
    .pj-mobile-logo {
        width: 60%;
    }
    .pj-close-sidebar {
        font-size: 22px;
    }
    .main-content {
        margin-left: 0;
        padding: 10px;
        margin-top: 50px;
    }
    .nowri-profile-container {
        padding: 20px;
    }
    .global-loader {
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(1px);
        -webkit-backdrop-filter: blur(1px);
    }
    .global-loader .spinner {
        width: 32px;
        height: 32px;
        border-width: 3px;
    }
    .pagination-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin: 15px 0;
    }
    .pagination {
        width: 100%;
        justify-content: flex-start;
    }
    .pagination ul {
        justify-content: flex-start;
        gap: 5px;
    }
    .pagination-wrapper {
        margin: 10px 0;
        gap: 10px;
    }
    .profile-count span {
        padding: 5px 8px;
        font-size: 12px;
    }
    .pagination a.page-numbers,
    .pagination span.page-numbers {
        padding: 5px 8px;
        font-size: 12px;
        min-width: 24px;
    }
    .pagination .current {
        padding: 5px 8px;
        font-size: 12px;
        min-width: 24px;
    }
    .pagination .prev,
    .pagination .next {
        padding: 5px 8px 5px 16px;
        min-width: 50px;
        font-size: 12px;
    }
    .pagination .prev:before {
        left: 5px;
        width: 5px;
        height: 5px;
    }
    .pagination .next:after {
        right: 5px;
        width: 5px;
        height: 5px;
    }
    .pagination .dots {
        padding: 5px;
        font-size: 12px;
    }
    img.pj-logo.desktop-logo {
    display: none;
}
}