/**
* Contractor Job Bidding - Public CSS
*/
*, *::before, *::after {
    box-sizing: border-box;
}

.cjb-form {
    max-width: 520px !important;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    overflow: hidden; /* prevents overflow issues */
}

.cjb-form h3 {
    margin-bottom: 20px;
    font-size: 22px;
    margin-top: 0;
}

/* Row Layout (2-column) */
.cjb-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.cjb-row .cjb-field {
    flex: 1 1 0;
    min-width: 0; 
    margin-bottom: 0;
}

.cjb-field {
    position: relative;
    margin-bottom: 20px;
}

.cjb-password-field {
    position: relative;
}

.cjb-password-field input {
    padding-right: 50px;
}

.cjb-password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    cursor: pointer;
    z-index: 5;
    object-fit: contain;
    user-select: none;
}

.cjb-field input,
.cjb-field textarea {
    width: 100%;
    padding: 14px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    background: transparent;
    outline: none;
}

.cjb-field textarea {
    min-height: 100px;
    resize: vertical;
    display: block; 
    line-height: 1.4;
}

.cjb-field label {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    background: #fff;
    padding: 0 5px;
    font-size: 13px;
    color: #777;
    transition: 0.2s ease;
    pointer-events: none;
}

.cjb-field input:focus + label,
.cjb-field input:not(:placeholder-shown) + label,
.cjb-field textarea:focus + label,
.cjb-field textarea:not(:placeholder-shown) + label {
    top: 0px;
    font-size: 11px;
    color: #0073aa;
}

.cjb-field input:focus,
.cjb-field textarea:focus {
    border-color: #0073aa;
}

body .cjb-field input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
    -webkit-text-fill-color: #000 !important;
}

body .cjb-field input:autofill {
    background-color: #fff !important;
}

.cjb-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
    color: #fff;
    text-decoration: none;
    border-radius: 16px;
    margin-top: 10px;
    font-weight: 600;
    transition: .3s;
    white-space: nowrap;
}

button.disabled {
    opacity: 0.5;
    pointer-events: none;
}

a.cjb-btn,span.cjb-btn{
    padding: 10px 0;
}

.cjb-btn-danger, .cjb-btn-danger:hover{
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #dc3545 !important;
    color: #fff;
    text-decoration: none;
    border-radius: 16px;
    margin-top: 10px;
    font-weight: 600;
    transition: .3s;
    white-space: nowrap;
}

.cjb-btn:hover, a.cjb-btn:hover {
    background: #005d8f;
    color: #fff;
}

.cjb-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    margin-bottom: 15px;
}

#cjb-message {
    text-align: center;
}

.cjb-success {
    background: #e6ffed;
    color: #1a7f37;
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 6px;
}

.cjb-error {
    background: #ffe6e6;
    color: #b30000;
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 6px;
}

.cjb-loading {
    background: #f0f0f0;
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 6px;
}

.cjb-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    margin-bottom: 20px;
}

.cjb-checkbox input[type="checkbox"] {
    width: auto;
    height: auto;
    margin: 0;
}

.cjb-checkbox label {
    position: static;
    transform: none;
    background: none;
    padding: 0;
    font-size: 13px;
    color: #333;
    cursor: pointer;
}

#cjb_register.disabled{
    opacity: 0.7;
    pointer-events: none;
}

.cjb-field input[type="file"]::file-selector-button {
  background-color: #111; /* Green background */
  color: white;              /* White text */
  padding: 10px 20px;        /* Spacing */
  border: none;
  border-radius: 5px;        /* Rounded corners */
  cursor: pointer;           /* Hand icon on hover */
  transition: background 0.3s;
}

.cjb-field input[type="file"]::file-selector-button:hover {
  background-color: #111; /* Darker green on hover */
}

.cjb-auth-wrapper{
    max-width:600px !important;
    margin:60px auto;
    background:#fff;
    border-radius:24px;
    overflow:hidden;
    box-shadow:0 20px 60px rgba(0,0,0,.08);
}

.cjb-auth-header{
    padding:15px;
    text-align:center;
    background:#111;
    color:#fff;
}

.cjb-auth-header h2{
    margin:15px 0 10px;
    color:#fff;
}

.cjb-auth-header p{
    opacity:.9;
    margin-bottom: 15px;
}

.cjb-auth-tabs{
    display:flex;
    border-bottom:1px solid #eee;
}

.cjb-auth-tabs button{
    flex:1;
    border:none;
    background:none;
    height:60px;
    font-weight:600;
    cursor:pointer;
    transition:.3s;
    color: #ddd;
}

.cjb-auth-tabs button.active{
    color:#111;
    border-bottom:3px solid #111;
}

.cjb-auth-content{
    padding:40px;
}

.cjb-tab-pane{
    display:none;
    animation:cjbFade .3s ease;
}

.cjb-tab-pane.active{
    display:block;
}

.cjb-auth-content form {
    box-shadow: none;
    padding: 0;
    margin: 0;
}

@keyframes cjbFade{
    from{
        opacity:0;
        transform:translateY(10px);
    }
    to{
        opacity:1;
        transform:none;
    }
}

.cjb-dashboard-wrapper{
    display:flex;
    gap:30px;
    align-items:flex-start;
    padding:30px 0;
}

.cjb-dashboard-sidebar {
    width: 30%;
}

.cjb-dashboard-sidebar{
    background:#ffffff;
    border-radius:20px;
    padding:24px;
    box-shadow:0 10px 30px rgba(0,0,0,0.06);
    position:sticky;
    top:30px;
}

.cjb-sidebar-header{
    margin-bottom:24px;
}

.cjb-sidebar-header h3{
    margin:0;
    font-size:24px;
    font-weight:700;
    color:#111;
}

.cjb-sidebar-menu{
    list-style:none;
    margin:0;
    padding:0;
}

.cjb-sidebar-menu li{
    margin-bottom:10px;
}

.cjb-sidebar-menu a{
    display:flex;
    align-items:center;
    gap:14px;
    padding:14px 16px;
    border-radius:14px;
    text-decoration:none;
    font-size:15px;
    font-weight:600;
    color:#374151;
    transition:all .25s ease;
    position:relative;
    background:#f3f4f6;
}

.cjb-sidebar-menu a:hover{
    transform:translateX(4px);
    /* filter: invert(1); */
    color: #fff;
    background:#111;
}

.cjb-sidebar-menu a:hover img{
    filter: invert(1);
}

.cjb-sidebar-menu a.active{
    background:#111;
    color:#ffffff;
}

.cjb-nav-icon{
    width:22px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:18px;
}

.active .cjb-nav-icon{
    filter: invert(1);
}

.cjb-nav-text
 {
    flex: 1;
    display: flex;
    gap: 10px;
}

.cjb-sidebar-divider{
    height:1px;
    background:#e5e7eb;
    margin:20px 0;
}

.cjb-logout-link{
    color:#dc2626 !important;
}

.cjb-logout-link:hover{
    background:#fef2f2 !important;
}

.cjb-logout-link:hover img{
    /* background:#fef2f2 !important; */
    filter: none !important;
}

/* Desktop */
.cjb-mobile-filter-bar{
    display:none;
}

button.cjb-close-filters {
    display: none;
}

#cjb-open-filters img {
    filter: invert(1);
    width: 25px;
    margin-right: 5px;
}

#cjb-apply-filters{
    display:none;
}

ul.cjb-sidebar-menu {
    padding-left: 0;
}

.cjb-dashboard-content{
    flex:1;
    min-width:0;
    background:#fff;
    border-radius:20px;
    padding:30px;
    box-shadow:0 10px 30px rgba(0,0,0,0.06);
    border:1px solid #edf0f5;
    margin-bottom:30px;
}

.cjb-page-wrapper{
    display:flex;
    gap:20px;
    align-items:flex-start;
    padding: 20px 0;
}

.cjb-sidebar{
    width:25%;
    position:sticky;
    top:20px;
    margin-right: 20px;
}

.cjb-main-content{
    flex:1;
}

.cjb-filters-card{
    background:#fff;
    padding:30px;
    border-radius:25px;
    border:1px solid #eee;
}

.cjb-filter-group{
    margin-bottom:20px;
}

.cjb-filter-group label{
    display:block;
    font-weight:600;
    margin-bottom:10px;
}

.cjb-filter-group input,
.cjb-filter-group select{
    width:100%;
    height:50px;
    border-radius:14px;
    border:1px solid #ddd;
    padding:0 15px;
}

.cjb-jobs-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:25px;
}

.cjb-job-card{
    background:#fff;
    border-radius:25px;
    overflow:hidden;
    border:1px solid #eee;
    transition:.3s;
}

.cjb-job-card:hover{
    transform:translateY(-5px);
}

.cjb-job-thumb img{
    width:100%;
    height:220px;
    object-fit:cover;
}

.cjb-job-content{
    padding:20px;
}

.cjb-job-content h3{
    margin:15px 0;
    font-size:24px;
    line-height:1.3;
}

.cjb-job-content h3 a{
    text-decoration:none;
    color:#111;
}

.cjb-job-meta{
    margin-bottom:15px;
    color:#666;
}

.cjb-job-budget{
    font-size:22px;
    font-weight:700;
}

.cjb-single-job{
    background:#f6f7fb;
    min-height:100vh;
    padding-bottom:60px;
    width: 100%;
}

.cjb-single-banner{
    height:380px;
    overflow:hidden;
}

.cjb-single-banner img{
    width:100%;
    height:100%;
    object-fit:cover;
}

.cjb-single-container{
    max-width:1300px;
    margin:-80px auto 0;
    padding:0 20px;
    display:grid;
    grid-template-columns:1fr 360px;
    gap:30px;
    position:relative;
    z-index:2;
}

.cjb-single-main{
    background:#fff;
    border-radius:24px;
    padding:40px;
    box-shadow:0 10px 40px rgba(0,0,0,0.06);
}

.cjb-single-header h1{
    font-size:42px;
    line-height:1.2;
    margin:15px 0;
    font-weight:700;
}

.cjb-single-badge{
    display:inline-flex;
    align-items:center;
    padding:8px 16px;
    border-radius:100px;
    background:#eef2ff;
    color:#4338ca;
    font-size:14px;
    font-weight:600;
}

.cjb-single-meta{
    display:flex;
    gap:20px;
    flex-wrap:wrap;
    color:#666;
    font-size:15px;
}

.cjb-single-content{
    margin-top:40px;
}

.cjb-single-content h3{
    font-size:28px;
    margin-bottom:20px;
}

.cjb-job-description{
    line-height:1.9;
    color:#555;
    font-size:16px;
}

.cjb-single-sidebar{
    position:sticky;
    top:40px;
    height:fit-content;
}

.cjb-sidebar-card{
    background:#fff;
    border-radius:24px;
    padding:30px;
    box-shadow:0 10px 40px rgba(0,0,0,0.06);
}

.cjb-sidebar-card h3{
    margin-top:0;
    margin-bottom:25px;
    font-size:24px;
}

.cjb-sidebar-card ul{
    list-style:none;
    padding:0;
    margin:0;
}

.cjb-sidebar-card li{
    display:grid;
    grid-template-columns:130px 1fr;
    gap:20px;
    padding:16px 0;
    border-bottom:1px solid #eee;
    color:#444;
    align-items:start;
}

.cjb-sidebar-card li strong{
    font-weight:700;
    color:#111;
    line-height:1.5;
}

.cjb-sidebar-card li span{
    color:#555;
    line-height:1.7;
    word-break:break-word;
}


.cjb-pagination{
    display:flex;
    align-items:center;
    gap:10px;
    margin-top:40px;
    flex-wrap:wrap;
    justify-content: center;
}

.cjb-page-btn{
    min-width:42px;
    height:42px;
    border:none;
    border-radius:12px;
    background:#ddd;
    cursor:pointer;
    transition:.3s;
    font-weight:600;
    padding:0 16px;
    color: #333;
}

.cjb-page-btn:hover{
    background:#111;
    color:#fff;
}

.cjb-page-btn.active{
    background:#111;
    color:#fff;
}

.cjb-page-btn.disabled{
    opacity:.5;
    pointer-events:none;
}

.cjb-pagination-dots{
    padding:0 5px;
    font-weight:700;
}


/* =========================================
LAYOUT
========================================= */

.cjb-single-container{
    display:flex;
    gap:20px;
    align-items:flex-start; /* important */
}

.cjb-single-main{
    flex:1;
    height:max-content;
}

.cjb-single-sidebar{
    width:360px;
    position:sticky;
    top:40px;
    align-self:flex-start;
    height:max-content;
    perspective:1500px;
}

/* =========================================
FLIP WRAPPER
========================================= */

.cjb-sidebar-flip{
    position:relative;
    width:100%;
    min-height:auto;
}

/* BOTH SIDES */

.cjb-sidebar-side{
    width:100%;
    transition:
        transform .7s ease,
        opacity .4s ease;
    transform-style:preserve-3d;
    backface-visibility:hidden;
}

/* FRONT */

.cjb-sidebar-front{
    position:relative;
    opacity:1;
    visibility:visible;
    transform:rotateY(0deg);
    z-index:2;
}

/* BACK */

.cjb-sidebar-back{
    position:absolute;
    top:0;
    left:0;
    width:100%;

    opacity:0;
    visibility:hidden;
    transform:rotateY(180deg);
    z-index:1;
    pointer-events:none;
}

/* ACTIVE */

.cjb-sidebar-flip.active .cjb-sidebar-front{
    opacity:0;
    visibility:hidden;
    transform:rotateY(-180deg);
    pointer-events:none;
}

.cjb-sidebar-flip.active .cjb-sidebar-back{
    opacity:1;
    visibility:visible;
    transform:rotateY(0deg);
    z-index:3;
    pointer-events:auto;
}

/* CARD */

.cjb-sidebar-card{
    background:#fff;
    border-radius:30px;
    padding:35px;
    box-shadow:0 10px 40px rgba(0,0,0,.06);
}

/* wrapper should animate height smoothly */

.cjb-sidebar-flip{
    position:relative;
    width:100%;
    transition:height .45s ease;
}

#cjb-bid-message, #cjb-edit-bid-message{
    margin-top: 10px;
}

.cjb-dashboard-table{
    width:100%;
    border-collapse:collapse;
}

.cjb-actions-col button img{
    filter: invert(1);
    width: 18px;
    height: 18px;
    margin-left: 5px;
}

.cjb-dashboard-table th,
.cjb-dashboard-table td{
    padding:14px;
    border-bottom:1px solid #eee;
    text-align:left;
}

.cjb-table-wrap{
    overflow:auto;
}

.cjb-bid-status{
    padding:6px 12px;
    border-radius:30px;
    font-size:12px;
    font-weight:600;
    white-space: nowrap;
}

.cjb-status-submitted,.cjb-status-updated{
    background:#eef3ff;
    color:#275df5;
}

.cjb-status-approved,
.cjb-status-accepted{
    background:#ebfff1;
    color:#0f9d58;
}

.cjb-status-rejected,
.cjb-status-withdrawn{
    background:#fff0f0;
    color:#e53935;
}

.cjb-modal{
    position:fixed;
    inset:0;
    z-index:99999;
    display:none;
}

.cjb-modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.cjb-modal-overlay{
    position:absolute;
    inset:0;
    background:rgba(0,0,0,.6);
}

.cjb-modal-dialog{
    position:relative;
    width:700px;
    max-width:90%;
    max-height:85vh;
    overflow:auto;
    background:#fff;
    border-radius:16px;
    margin:60px auto;
    padding:30px;
    z-index:2;
}

.cjb-modal-close {
    line-height: 1;
    padding: 0 .2em .15em;
    text-align: center;
    transition: color 0.12s ease-in-out;
    position: absolute;
    top: 10px;
    right: 20px;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: #f3f4f6;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    background-color: #000;
}


.cjb-modal-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:20px;
    margin-bottom:20px;
}

/*=========================================
BIDS TOPBAR
=========================================*/

.cjb-bids-topbar{
    display:flex;
    gap:15px;
    margin-top:20px;
    flex-wrap:wrap;
}

.cjb-bids-topbar input,
.cjb-bids-topbar select{
    height:48px;
    border:1px solid #ddd;
    border-radius:12px;
    padding:0 16px;
    min-width:220px;
}

/*=========================================
ACTION BUTTONS
=========================================*/

.cjb-actions-col{
    /* display:flex; */
    gap:8px;
    flex-wrap:wrap;
}

.cjb-bid-info {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 10px;
}

.notification {
    position: relative;
    width: 40px;
    height: 40px;
    background: #e5e5e5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Bell Shape */
.bell-icon {
  position: relative;
  width: 20px;
  height: 20px;
}

.badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    background: red;
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.bid-notes-wrapper h3 {
    text-transform: capitalize;
}

.cjb-stats-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:20px;
    margin:30px 0 0 0;
}

.cjb-stat-card{
    position:relative;
    overflow:hidden;
    border-radius:16px;
    padding:25px;
    color:#fff;
    box-shadow:0 10px 30px rgba(0,0,0,.08);
    transition:all .3s ease;
}

.cjb-stat-card:hover{
    transform:translateY(-4px);
}

.cjb-stat-card::after{
    content:'';
    position:absolute;
    top:-40px;
    right:-40px;
    width:120px;
    height:120px;
    background:rgba(255,255,255,.12);
    border-radius:50%;
}

.cjb-stat-label{
    display:block;
    font-size:14px;
    font-weight:500;
    opacity:.9;
    margin-bottom:12px;
}

.cjb-stat-card strong{
    display:block;
    font-size:34px;
    line-height:1;
    font-weight:700;
}

/* Colors */

.cjb-card-blue{
    background:linear-gradient(135deg,#2563eb,#1d4ed8);
}

.cjb-card-cyan{
    background:linear-gradient(135deg,#0891b2,#0e7490);
}

.cjb-card-green{
    background:linear-gradient(135deg,#16a34a,#15803d);
}

.cjb-card-orange{
    background:linear-gradient(135deg,#f59e0b,#d97706);
}

.cjb-card-red{
    background:linear-gradient(135deg,#ef4444,#dc2626);
}

.cjb-card-purple{
    background:linear-gradient(135deg,#7c3aed,#6d28d9);
}


@media(max-width:991px){

    .cjb-single-header h1{
        font-size:30px;
    }

    .cjb-single-main{
        padding:25px;
    }

    .cjb-page-wrapper{
        flex-direction:column;
    }

    .cjb-sidebar{
        width:100%;
        position:relative;
    }

    .cjb-jobs-grid{
        grid-template-columns:1fr 1fr;
    }

    .cjb-single-container{
        display:block;
    }

    .cjb-single-sidebar {
        width: 100%;
        margin-top: 20px;
    }

    .cjb-dashboard-wrapper{
        display: block;
    }

    .cjb-dashboard-sidebar {
        width: 100%;
        margin-bottom: 20px;
        padding: 15px;
        position: unset;
    }

    ul.cjb-sidebar-menu {
        display: flex;
        width: 100%;
        padding-left: 0;
        list-style: none;
        gap: 20px;
        margin: 0 !important;
    }

    ul.cjb-sidebar-menu li:not(.cjb-sidebar-divider) {
        flex: 1;
    }

    ul.cjb-sidebar-menu li a {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        box-sizing: border-box;
    }

    .cjb-sidebar-divider {
        display: none;
    }

}

/* Mobile */
@media (max-width: 768px){

    .cjb-dashboard-sidebar{
        position:relative;
        top:auto;
        margin-bottom:20px;
    }

    .cjb-sidebar-menu a{
        padding:12px 14px;
        font-size:14px;
    }

    #cjb-apply-filters{
        display:block;
        width:100%;
        margin-bottom:10px;
    }

    .cjb-mobile-filter-bar{
        display:flex;
    }

    .cjb-mobile-filter-bar .cjb-btn{
        width:100%;
    }

    .cjb-sidebar{
        position: fixed !important;
        top: 0 !important;
        left: -100%;
        width: 100% !important;
        height: max-content;
        background: #fff;
        overflow-y: auto;
        z-index: 9999;
        transition: .3s ease;
        padding: 20px;
        box-shadow: 0 0 30px rgba(0, 0, 0, .15);
    }

    .cjb-sidebar.active{
        left:0;
    }

    .cjb-sidebar-overlay{
        position:fixed;
        inset:0;
        background:rgba(0,0,0,.5);
        opacity:0;
        visibility:hidden;
        transition:.3s;
        z-index:9998;
    }

    .cjb-sidebar-overlay.active{
        opacity:1;
        visibility:visible;
    }

    .cjb-close-filters{
        display: flex !important;
        border:none;
        background:none;
        font-size:28px;
        cursor:pointer;
        display: flex !important;
        background-color: #111111;
        float: right;
        margin: 10px;
    }

    .cjb-filters-card{
        border: none !important;
    }

}

@media (max-width: 767px) {

    .cjb-row {
        flex-direction: column;
    }

    .cjb-bids-topbar .cjb-row {
        display: flex;
        flex-direction: initial;
    }

    .cjb-modal-grid{
        grid-template-columns:1fr;
    }

}

@media (max-width: 660px){

    .cjb-sidebar-menu{
        display:grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap:15px !important;
    }

    .cjb-sidebar-menu li{
        width:100%;
    }

}

@media (max-width: 560px) {

    .cjb-bids-topbar .cjb-row {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

}

@media (max-width: 520px) {

    .cjb-jobs-grid{
        grid-template-columns:1fr;
    }

    .cjb-archive-page-wrapper .cjb-main-content{
        width: 100%;
    }

}

@media (max-width: 420px){

    .cjb-sidebar-menu{
        display:block !important;
    }

}