/* ================================================
   BLUE CONNECT - PLANT DOCTOR
   ================================================ */


/* FLOATING CAMERA */

#bcPlantDoctorBtn {

    position: fixed;

    right: 18px;
    bottom: 105px;

    width: 58px;
    height: 58px;

    padding: 0;

    border: none;
    border-radius: 50%;

    background: #ffffff;
    color: #159447;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    z-index: 99998;

    box-shadow:
        0 5px 18px rgba(0,0,0,.25);

    animation:
        bcPlantPulse 2s infinite;
}


#bcPlantDoctorBtn svg {

    width: 29px;
    height: 29px;

}


@keyframes bcPlantPulse {

    0% {

        transform: scale(1);

        box-shadow:
            0 0 0 0 rgba(21,148,71,.55),
            0 5px 18px rgba(0,0,0,.25);

    }

    70% {

        transform: scale(1.06);

        box-shadow:
            0 0 0 13px rgba(21,148,71,0),
            0 5px 18px rgba(0,0,0,.25);

    }

    100% {

        transform: scale(1);

        box-shadow:
            0 0 0 0 rgba(21,148,71,0),
            0 5px 18px rgba(0,0,0,.25);

    }

}


/* OVERLAY */

#bcPlantOverlay {

    position: fixed;

    inset: 0;

    padding: 18px;

    box-sizing: border-box;

    background:
        rgba(0,0,0,.62);

    display: none;

    align-items: center;
    justify-content: center;

    z-index: 99999;

}


/* MODAL */

.bc-plant-modal {

    position: relative;

    width: min(520px, 100%);

    max-height: 92vh;

    overflow-y: auto;

    box-sizing: border-box;

    padding: 27px;

    background: #ffffff;

    border-radius: 22px;

    box-shadow:
        0 18px 60px rgba(0,0,0,.35);

}


/* CLOSE */

.bc-plant-close {

    position: absolute;

    top: 12px;
    right: 14px;

    width: 40px;
    height: 40px;

    padding: 0;

    border: none;

    background: transparent;

    color: #333333;

    font-size: 31px;

    cursor: pointer;

    z-index: 10;

}


/* HEADER */

.bc-plant-header {

    padding: 4px 35px 0;

    margin-bottom: 22px;

    text-align: center;

}


.bc-plant-header h2 {

    margin: 0 0 8px;

    color: #159447;

    font-size: 23px;

    font-weight: 700;

}


.bc-plant-header p {

    margin: 0;

    color: #666666;

    font-size: 16px;

    line-height: 1.5;

}


/* OPEN CAMERA */

.bc-open-camera {

    width: 100%;

    padding: 34px 18px;

    border:
        2px dashed #159447;

    border-radius: 17px;

    background: #effff5;

    display: flex;

    flex-direction: column;

    align-items: center;

    cursor: pointer;

    font-family: inherit;

    transition:
        background .2s ease,
        transform .2s ease;

}


.bc-open-camera:hover {

    background: #e3ffed;

    transform:
        translateY(-1px);

}


.bc-big-camera {

    display: block;

    margin-bottom: 10px;

    font-size: 47px;

}


.bc-camera-title {

    color: #147a3e;

    font-size: 21px;

    font-weight: 700;

}


.bc-camera-subtitle {

    margin-top: 7px;

    color: #666666;

    font-size: 14px;

    font-weight: 400;

}


/* LOADING */

.bc-camera-loading {

    display: none;

    min-height: 170px;

    padding: 20px;

    box-sizing: border-box;

    border-radius: 16px;

    background: #f3fff7;

    align-items: center;

    justify-content: center;

    flex-direction: column;

    text-align: center;

    color: #147a3e;

}


.bc-camera-loading span {

    margin-top: 7px;

    color: #666666;

    font-size: 13px;

}


.bc-spinner {

    width: 35px;
    height: 35px;

    margin-bottom: 13px;

    border:
        4px solid #d9f5e3;

    border-top-color:
        #159447;

    border-radius: 50%;

    animation:
        bcSpin .8s linear infinite;

}


@keyframes bcSpin {

    to {
        transform: rotate(360deg);
    }

}


/* LIVE CAMERA */

.bc-camera-area {

    display: none;

    position: relative;

    width: 100%;

    overflow: hidden;

    border-radius: 16px;

    background: #111111;

}


#bcCameraVideo {

    display: block;

    width: 100%;

    max-height: 420px;

    object-fit: cover;

    background: #111111;

}


.bc-camera-guide {

    position: absolute;

    left: 10px;
    right: 10px;
    bottom: 12px;

    display: flex;

    justify-content: center;

    pointer-events: none;

}


.bc-camera-guide span {

    padding: 7px 12px;

    border-radius: 20px;

    background:
        rgba(0,0,0,.68);

    color: #ffffff;

    font-size: 12px;

    text-align: center;

}


/* HIDDEN CANVAS */

#bcPlantCanvas {

    display: none;

}


/* CAPTURED IMAGE */

#bcCapturedArea {

    display: none;

}


#bcPlantPreview {

    display: block;

    width: 100%;

    max-height: 420px;

    object-fit: contain;

    border-radius: 16px;

    background: #f3f3f3;

}


/* BUTTONS */

.bc-primary-button {

    width: 100%;

    padding: 14px 16px;

    border: none;

    border-radius: 12px;

    background: #159447;

    color: #ffffff;

    font-family: inherit;

    font-size: 16px;

    font-weight: 700;

    cursor: pointer;

}


.bc-primary-button:hover {

    background: #107b39;

}


#bcTakePhoto {

    display: none;

    margin-top: 14px;

}


/* PHOTO ACTIONS */

.bc-photo-actions {

    display: none;

    grid-template-columns:
        1fr 1fr;

    gap: 10px;

    margin-top: 14px;

}


.bc-secondary-button {

    width: 100%;

    padding: 14px 12px;

    border:
        1px solid #159447;

    border-radius: 12px;

    background: #ffffff;

    color: #159447;

    font-family: inherit;

    font-size: 15px;

    font-weight: 700;

    cursor: pointer;

}


.bc-secondary-button:hover {

    background: #effff5;

}


/* REAL ERROR */

.bc-camera-error {

    display: none;

    padding: 20px;

    box-sizing: border-box;

    border:
        1px solid #ffd0d0;

    border-radius: 15px;

    background: #fff4f4;

    color: #8c2929;

    text-align: center;

}


.bc-error-icon {

    margin-bottom: 7px;

    font-size: 30px;

}


.bc-camera-error strong {

    display: block;

    font-size: 17px;

}


.bc-camera-error p {

    margin:
        9px 0 16px;

    color: #7c3838;

    font-size: 14px;

    line-height: 1.6;

}


/* PHOTO TIPS */

.bc-photo-tip {

    margin-top: 19px;

    padding: 14px;

    border-radius: 12px;

    background: #fff8e7;

    color: #745600;

    font-size: 13px;

    line-height: 1.75;

}


/* MOBILE */

@media (max-width: 600px) {

    #bcPlantDoctorBtn {

        /*
          Same horizontal position on mobile.
        */

        right: 18px;
        bottom: 105px;

        width: 58px;
        height: 58px;

    }


    #bcPlantOverlay {

        padding: 10px;

    }


    .bc-plant-modal {

        width: 100%;

        max-height: 94vh;

        padding:
            22px 18px;

        border-radius:
            19px;

    }


    .bc-plant-header {

        padding:
            5px 30px 0;

        margin-bottom:
            18px;

    }


    .bc-plant-header h2 {

        font-size:
            20px;

    }


    .bc-plant-header p {

        font-size:
            14px;

    }


    #bcCameraVideo,
    #bcPlantPreview {

        max-height:
            55vh;

    }

}


/* VERY SMALL PHONES */

@media (max-width: 380px) {

    .bc-photo-actions {

        grid-template-columns:
            1fr;

    }

}