/* ==========================================
   GPW Frontend Stylesheet
   ========================================== */

/* --- 1. Common Font & Layout Wrapper --- */
.gpw-map-wrap,
.gpw-tech-page,
.gpw-upload-wrap,
.gpw-infowindow,
.gpw-pop-wrap,
#gpw-overlay,
#gpw-mobile-sheet,
.gpw-map-wrap *,
.gpw-tech-page *,
.gpw-upload-wrap *,
.gpw-infowindow *,
.gpw-pop-wrap *,
#gpw-overlay *,
#gpw-mobile-sheet * {
    font-family: inherit;
}
.gpw-map-wrap input,
.gpw-map-wrap textarea,
.gpw-map-wrap select,
.gpw-map-wrap button,
.gpw-tech-page input,
.gpw-tech-page textarea,
.gpw-tech-page select,
.gpw-tech-page button,
.gpw-upload-wrap input,
.gpw-upload-wrap textarea,
.gpw-upload-wrap select,
.gpw-upload-wrap button,
.gpw-infowindow input,
.gpw-infowindow textarea,
.gpw-infowindow select,
.gpw-infowindow button,
.gpw-pop-wrap input,
.gpw-pop-wrap textarea,
.gpw-pop-wrap select,
.gpw-pop-wrap button,
#gpw-overlay input,
#gpw-overlay textarea,
#gpw-overlay select,
#gpw-overlay button,
#gpw-mobile-sheet input,
#gpw-mobile-sheet textarea,
#gpw-mobile-sheet select,
#gpw-mobile-sheet button {
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
}
.gpw-page-wrapper {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
}

/* --- 2. Map Container & Live Button --- */
.gpw-map-container {
    position: relative;
}
#gpw-map {
    height: 480px;
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, .13);
}
.gpw-tech-page #gpw-map {
    height: 420px;
}


/* --- 3. Work Slider Track & Section Headers --- */
#gpw-work-slider-section {
    margin-top: 36px;
    display: none;
}
.gpw-tech-page #gpw-work-slider-section {
    margin-top: 0;
}
.gpw-section-header,
.gpw-tech-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid #C8102E;
}
.gpw-tech-section-header {
    justify-content: flex-start;
    margin-bottom: 16px;
    padding-bottom: 10px;
}

#gpw-job-count {
    font-size: 13px;
    color: #888;
}
.gpw-slider-container {
    position: relative;
    overflow: visible;
    padding: 0 24px;
}
#gpw-slider-track {
    gap: 22px;
    transition: transform .4s cubic-bezier(.25,.8,.25,1);
    will-change: transform;
}

/* --- 4. Work Card --- */
.gpw-work-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 18px rgba(0, 0, 0, .08);
    cursor: pointer;
    transition: transform .22s, box-shadow .22s;
    border: 1px solid #eee;
    flex: 1 1 calc(33.333% - 15px);
    min-width: 260px;
    max-width: calc(50% - 11px);
    box-sizing: border-box;
}
.gpw-work-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 36px rgba(26, 43, 92, .16);
}
.gpw-card-img-wrap {
    position: relative;
    height: 210px;
    overflow: hidden;
    background: #f5f5f5;
}
.gpw-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.gpw-card-brand {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(26, 43, 92, .88) 0%, transparent 100%);
    padding: 28px 14px 10px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}
.gpw-card-brand-name {
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .3px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.gpw-card-photo-count {
    background: rgba(255, 255, 255, .2);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    backdrop-filter: blur(4px);
}
.gpw-card-body {
    padding: 14px 16px 16px;
}
.gpw-card-desc {
    font-size: 13px;
    color: #444;
    line-height: 1.75;
    margin: 0 0 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.gpw-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}
.gpw-card-tech {
    font-size: 12px;
    font-weight: 700;
    color: #1A2B5C;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
}
.gpw-card-tech:hover {
    color: #C8102E;
}
.gpw-card-city {
    background: #C8102E;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 13px;
    border-radius: 20px;
    text-decoration: none;
    white-space: nowrap;
    transition: background .2s;
}
.gpw-card-city:hover {
    background: #a00d25;
}

/* Slick slider integrations and overrides */
.slick-track {
    margin-left: 0px;
}
div[style*="max-width:1100px"] {
    width: 100% !important;
}
#gpw-slider-track:not(.slick-initialized) {
    flex-wrap: wrap !important;
    transform: none !important;
}

/* --- 5. Technician Profile Page --- */
.gpw-tech-header {
    display: flex;
    align-items: center;
    gap: 24px;
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 2px 18px rgba(0, 0, 0, .07);
    margin-bottom: 32px;
    border-left: 5px solid #C8102E;
    flex-wrap: wrap;
}
.gpw-tech-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #C8102E;
    flex-shrink: 0;
}
.gpw-tech-default-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: #1A2B5C;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 36px;
}
.gpw-tech-header-info {
    flex: 1;
    min-width: 200px;
}

.gpw-tech-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.gpw-tech-badge-red {
    background: #fff0f2;
    color: #C8102E;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px solid #fcc;
}
.gpw-tech-badge-blue {
    background: #f0f4ff;
    color: #1A2B5C;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px solid #cdd;
}
.gpw-tech-section {
    margin-bottom: 32px;
}

/* --- 6. Technician Mobile Upload Form --- */
.gpw-upload-wrap {
    max-width: 560px;
    margin: 0 auto;
    background: #fff;
    border-radius: 20px;
    padding: 28px 24px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, .1);
    box-sizing: border-box;
    width: 100%;
}
.gpw-upload-wrap h2 {
    color: #1A2B5C;
    margin: 0 0 20px;
}
.gpw-field {
    margin-bottom: 14px;
}
.gpw-field label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 6px;
}
.gpw-field input,
.gpw-field textarea,
.gpw-field select {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    border: 1.5px solid #ddd;
    border-radius: 10px;
    box-sizing: border-box;
    transition: border .2s, background .2s, color .2s;
}
.gpw-field input:focus,
.gpw-field textarea:focus,
.gpw-field select:focus {
    border-color: #C8102E;
    outline: none;
}
#gpw-tech-name {
    white-space: normal;
    word-break: break-word;
    height: auto;
    min-height: 48px;
    background: #fff;
    appearance: none;
    -webkit-appearance: none;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8"><path d="M1 1l5 5 5-5" stroke="%231A2B5C" stroke-width="2" fill="none"/></svg>');
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
}
#gpw-tech-name option {
    white-space: normal;
    word-wrap: break-word;
}
.gpw-photo-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 18px;
    background: #fff5f6;
    border: 2px dashed #C8102E;
    border-radius: 12px;
    color: #C8102E;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-sizing: border-box;
    margin-bottom: 10px;
}
.gpw-photo-trigger:hover {
    background: #ffe0e5;
}
#gpw-file-input {
    display: none !important;
}
.gpw-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}
.gpw-thumb {
    position: relative;
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    background: #f0f0f0;
}
.gpw-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.gpw-thumb-num {
    position: absolute;
    bottom: 5px;
    left: 5px;
    background: rgba(0, 0, 0, .5);
    color: #fff;
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 8px;
}
.gpw-thumb-rm {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, .6);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}
.gpw-submit-btn {
    width: 100%;
    padding: 15px;
    background: #C8102E;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: background .2s;
    margin-top: 4px;
}
.gpw-submit-btn:hover {
    background: #a00d25;
}
.gpw-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}
.gpw-progress-bar-wrap {
    width: 100%;
    height: 8px;
    background: #eee;
    border-radius: 8px;
    margin: 10px 0;
    display: none;
    overflow: hidden;
}
.gpw-progress-bar {
    height: 100%;
    background: linear-gradient(to right, #C8102E, #1A2B5C);
    border-radius: 8px;
    width: 0;
    transition: width .3s;
}
.gpw-status {
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    display: none;
}
.gpw-status.success {
    background: #d4edda;
    color: #155724;
}
.gpw-status.error {
    background: #f8d7da;
    color: #721c24;
}
.gpw-location-banner {
    background: #fff5f6;
    border: 1.5px solid #fcc;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 13px;
    color: #C8102E;
    margin-bottom: 14px;
    display: none;
}
.gpw-location-banner button {
    margin-top: 8px;
    background: #C8102E;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.gpw-location-banner button:hover {
    background: #a00d25;
}
.gpw-location-ok {
    background: #f0fff4;
    border-color: #b7e4c7;
    color: #155724;
}
#gpw-photo-count {
    font-size: 13px;
    color: #888;
    display: none;
    margin-bottom: 6px;
}
#gpw-tech-loading {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
    display: none;
}
.gpw-field-hidden {
    display: none;
}
.gpw-field input.gpw-field-autofilled {
    background-color: #f8f9fa;
    color: #555;
}
#gpw-email-hint {
    font-size: 11px;
    color: #888;
    margin-top: 3px;
    display: none;
}
#gpw-note {
    resize: vertical;
}
#gpw-prog-label {
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
    display: none;
}
#gpw-no-jobs-notice {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    background: rgba(255,255,255,.98);
    padding: 25px 35px;
    border-radius: 16px;
    font-size: 15px;
    color: #1A2B5C;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
    border: 1px solid #eee;
    z-index: 1000;
    max-width: 280px;
}
.gpw-no-jobs-icon {
    font-size: 24px;
    margin-bottom: 10px;
}
.gpw-no-jobs-title {
    display: block;
    margin: 0 0 8px;
    font-size: inherit;
    font-weight: 700;
}
.gpw-no-jobs-text {
    margin: 0 0 15px;
    color: #666;
    font-size: 13px;
    line-height: 1.5;
}
.gpw-no-jobs-btn {
    background: #C8102E;
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
}
.gpw-no-jobs-btn:hover {
    background: #a00d25;
}
.gpw-infowindow {
    text-align: center;
    font-family: inherit;
    padding: 4px;
}
.gpw-infowindow-title {
    margin: 4px 0 2px;
    font-weight: 700;
}
.gpw-infowindow-icon {
    font-size: 20px;
}
.gpw-infowindow-coords {
    color: #888;
}
.gpw-flex-spacer {
    flex: 1;
    min-height: 8px;
}



/* --- 7. Responsive Breakpoints --- */
@media(max-width:900px) {
    .gpw-work-card {
        flex: 1 1 calc(50% - 11px);
        min-width: 0;
        max-width: calc(50% - 11px);
    }
}
@media(max-width:600px) {
    .gpw-tech-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 16px !important;
    }
    .gpw-tech-header img {
        width: 80px !important;
        height: 80px !important;
    }
}
@media(max-width:580px) {
    .gpw-work-card {
        flex: 1 1 100%;
        min-width: 0;
        max-width: 100%;
    }
}
@media(max-width:480px) {
    .gpw-upload-wrap {
        padding: 20px 16px;
        border-radius: 14px;
    }

    .gpw-preview-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .gpw-photo-trigger {
        font-size: 14px;
        padding: 14px;
    }
    .gpw-submit-btn {
        font-size: 15px;
        padding: 13px;
    }
}
