/* ============================================
   Visitor Folder Consolidated CSS
   All styles for visitor pages
   ============================================ */

/* Base Form Styles */
.form-control {
    margin-bottom: 10px !important;
    text-transform: uppercase;
}

label {
    margin-bottom: 0.5rem;
}

.mandetory {
    color: red;
}

/* Index Page Styles */
.logo_logo {
    width: 200px;
    margin-top: 50px;
    margin-bottom: 50px;
}

.img_img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.mobile_short {
    font-size: 25px;
    padding-bottom: 16px;
}

/* Tablet Responsive Index Styles */
@media screen and (max-width: 1024px) and (min-width: 601px) {
    /* Allow natural height, minimal whitespace */
    html, body {
        overflow-x: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Container auto height */
    body > .container {
        padding: 5px !important;
        margin: 0 auto !important;
        height: auto !important;
        display: block !important;
        overflow: visible !important;
    }
    
    /* Logo section - minimal height */
    body > .container > .mt-2 > .col-md-12:first-child {
        flex: 0 0 auto !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    body > .container > .mt-2 > .col-md-12:first-child center {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .logo_logo {
        width: 80px !important;
        height: auto !important;
        margin: 5px auto !important;
        display: block !important;
    }
    
    /* Cards container - takes remaining space */
    body > .container > .mt-2 {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    body > .container > .mt-2 > .col-md-12:last-child {
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* 2x2 Grid Row */
    body > .container > .mt-2 > .col-md-12 > .row {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        grid-template-rows: auto auto !important;
        gap: 6px !important;
        overflow: visible !important;
    }
    
    /* Each card column */
    body > .container > .mt-2 > .col-md-12 > .row > .col-6 {
        padding: 2px !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
        overflow: visible !important;
    }
    
    /* Card styling */
    .col-6 .user-card {
        margin: 0 !important;
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        border-radius: 6px !important;
        height: auto !important;
    }
    
    .user-card .card-header {
        padding: 4px !important;
        flex: 0 0 auto !important;
    }
    
    .user-card .cover-img-block {
        margin: 0 !important;
        padding: 0 !important;
        height: 60px !important;
    }
    
    .user-card .img_img {
        height: 80px !important;
        width: 100% !important;
        object-fit: cover !important;
    }
    
    .user-card .card-body {
        padding: 8px 10px !important;
        flex: 1 1 auto !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 10px !important;
    }
    
    .user-card .user-about-block {
        margin: 0 !important;
        padding: 0 !important;
        display: flex !important;
        justify-content: center !important;
    }
    
    .user-card .mobile_short {
        font-size: 13px !important;
        margin: 4px 0 !important;
        padding: 0 !important;
        text-align: center !important;
    }
    
    .user-card hr {
        margin: 4px auto !important;
        width: 50px !important;
    }
    
    .user-card .btn {
        padding: 6px 10px !important;
        font-size: 12px !important;
        width: 100% !important;
        align-self: stretch !important;
    }

    .user-card .row.text-center {
        width: 100% !important;
        margin: 0 !important;
    }
}

/* Header Responsive Styles */
/* Tablet Responsive Header Styles (768px - 1024px) */
@media screen and (max-width: 1024px) and (min-width: 769px) {
    .navbar {
        padding: 8px 15px;
    }
    
    .b-brand .logo {
        width: 130px !important;
    }
    
    .b-brand .logo-thumb {
        width: 45px !important;
    }
    
    marquee {
        width: 100% !important;
        max-width: 100% !important;
        font-size: 13px !important;
        padding: 8px 0;
    }
    .card .card-block{
        padding: 0px!important;
    }
}

/* Mobile Responsive Header Styles */
@media screen and (max-width: 768px) {
    .navbar {
        padding: 5px 10px;
    }
    
    .b-brand .logo {
        width: 120px !important;
    }
    
    .b-brand .logo-thumb {
        width: 40px !important;
    }
    
    marquee {
        width: 100% !important;
        max-width: 100% !important;
        font-size: 12px !important;
        padding: 5px 0;
    }
    
    .navbar-collapse {
        margin-top: 10px;
    }
    
    .full-screen {
        padding: 5px;
    }
    .card .card-block{
        padding: 0px!important;
    }
}

@media screen and (max-width: 480px) {
    .b-brand .logo {
        width: 100px !important;
    }
    
    marquee {
        font-size: 11px !important;
    }
}

/* Index Page Mobile Styles */
@media screen and (max-width: 600px) {
    .img_img {
        width: 100%;
        height: 100px;
        object-fit: cover;
    }

    .mobile_short {
        font-size: 15px;
        padding-bottom: 16px;
    }

    .logo_logo {
        width: 170px;
        margin-top: 20px;
        margin-bottom: 20px;
    }

    .my-4 {
        margin-top: 20px !important;
        margin-bottom: 20px !important;
    }
}

/* Tablet Responsive Styles (768px - 1024px) */
@media screen and (max-width: 1024px) and (min-width: 769px) {
    .pcoded-wrapper {
        margin-top: 15px !important;
    }
    
    .container {
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100%;
    }
    
    .card {
        margin: 15px 0;
        border-radius: 8px;
    }
    
    .card-header {
        padding: 15px;
    }
    
    .card-header h5 {
        font-size: 20px;
    }
    
    .card-block {
        padding: 15px;
    }
    
    .row > [class*="col-md-"] {
        margin-bottom: 15px;
    }
    
    .form-control,
    .form-select {
        padding: 10px;
        font-size: 15px;
    }
    
    label {
        font-size: 15px;
        margin-bottom: 8px;
    }
    
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    #tbl_posts {
        min-width: 800px;
    }
    
    table {
        min-width: 800px;
    }
    
    .btn-sm {
        padding: 8px 15px;
        font-size: 13px;
    }
    
    .btn-lg {
        padding: 12px 20px;
        font-size: 16px;
    }
}

/* Mobile Responsive Styles (up to 768px) */
@media screen and (max-width: 768px) {
    /* Prevent horizontal scroll on body */
    body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }
    
    html {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }
    
    .pcoded-wrapper {
        margin-top: 10px !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    .pcoded-content {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    .pcoded-inner-content {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    .container {
        padding-left: 10px;
        padding-right: 10px;
        max-width: 100% !important;
        width: 100% !important;
        overflow-x: hidden !important;
    }
    
    .main-body {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    .page-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        margin-top: 30px;
    }
    
    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .card {
        margin: 10px 0;
        border-radius: 6px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    .card-header {
        padding: 12px;
    }
    
    .card-header h5 {
        font-size: 18px;
        margin: 0;
    }
    
    .card-block {
        padding: 12px;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    /* Make all columns full width on mobile */
    .row > [class*="col-"] {
        /* margin-bottom: 15px; */
        width: 100%;
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    /* Table responsive - horizontal scroll */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        display: block;
        width: 100%;
        max-width: 100%;
        margin-bottom: 15px;
        position: relative;
    }
    
    .table-responsive::-webkit-scrollbar {
        height: 8px;
    }
    
    .table-responsive::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 4px;
    }
    
    .table-responsive::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 4px;
    }
    
    .table-responsive::-webkit-scrollbar-thumb:hover {
        background: #555;
    }
    
    #tbl_posts {
        display: table;
        width: 100%;
        min-width: 700px;
        margin-bottom: 0;
        table-layout: auto;
    }
    
    #tbl_posts thead {
        display: table-header-group;
    }
    
    #tbl_posts tbody {
        display: table-row-group;
    }
    
    #tbl_posts tr {
        display: table-row;
        border: none;
        margin: 0;
        padding: 0;
        background: transparent;
    }
    
    #tbl_posts td,
    #tbl_posts th {
        display: table-cell;
        padding: 10px 8px;
        text-align: left;
        border: 1px solid #dee2e6;
        white-space: nowrap;
    }
    
    #tbl_posts td:before {
        display: none;
    }
    
    #tbl_posts th {
        font-size: 12px;
        font-weight: 600;
        background-color: #f8f9fa;
    }
    
    #tbl_posts td {
        font-size: 13px;
    }
    
    table {
        display: table;
        width: 100%;
        min-width: 700px;
        margin-bottom: 0;
        table-layout: auto;
    }
    
    table thead {
        display: table-header-group;
    }
    
    table tbody {
        display: table-row-group;
    }
    
    table tr {
        display: table-row;
    }
    
    table td,
    table th {
        display: table-cell;
        padding: 10px 8px;
        font-size: 13px;
        white-space: nowrap;
    }
    
    table th {
        font-size: 12px;
        font-weight: 600;
        background-color: #f8f9fa;
    }
    
    /* OTP section mobile fix */
    #otp_display {
        font-size: 12px;
        padding: 12px !important;
        margin-top: 10px;
    }
    
    #otp_value {
        font-size: 20px !important;
    }
    
    .btn-sm {
        padding: 8px 12px;
        font-size: 13px;
        width: 100%;
        margin-bottom: 8px;
    }
    
    .btn-lg {
        width: 100%;
        padding: 14px;
        font-size: 16px;
        margin-top: 10px;
    }
    
    .add-record {
        width: 100%;
        margin-bottom: 15px;
    }
    
    /* Form controls mobile */
    .form-control,
    .form-select {
        font-size: 16px; /* Prevents zoom on iOS */
        /* padding: 12px; */
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        border-radius: 4px;
    }
    
    /* Prevent perfect-scrollbar on mobile */
    .ps {
        overflow: visible !important;
    }
    
    .ps__rail-x,
    .ps__rail-y {
        display: none !important;
    }
    
    label {
        font-size: 14px;
        font-weight: 500;
        margin-bottom: 8px;
        display: block;
    }
    
    /* Spacing adjustments */
    br {
        display: none;
    }
    
    .card-block table-border-style {
        padding: 0;
    }
}

/* Small Mobile (up to 480px) */
@media screen and (max-width: 480px) {
    .pcoded-wrapper {
        margin-top: 5px !important;
    }
    
    .container {
        padding-left: 8px;
        padding-right: 8px;
    }
    
    .card-header {
        padding: 10px;
    }
    
    .card-header h5 {
        font-size: 16px;
    }
    
    .card-block {
        padding: 10px;
    }
    
    label {
        font-size: 13px;
    }
    
    .form-control,
    .form-select {
        font-size: 16px;
        /* padding: 10px; */
    }
    
    .btn {
        font-size: 14px;
        padding: 10px 15px;
    }
    
    .btn-sm {
        font-size: 12px;
        padding: 8px 10px;
    }
    
    #tbl_posts {
        min-width: 600px;
    }
    
    #tbl_posts th,
    #tbl_posts td {
        font-size: 11px;
        padding: 8px 5px;
    }
    
    table {
        min-width: 600px;
    }
    
    table th,
    table td {
        font-size: 11px;
        padding: 8px 5px;
    }
    
    #otp_display {
        padding: 10px !important;
    }
    
    #otp_value {
        font-size: 18px !important;
    }
}

.page-wrapper{
    margin-top: 30px;
}