/* CSS extracted from resources/views/request/weather.blade.php */

.validation-error {
    border: 2px solid #dc3545 !important;
    animation: slam 0.2s ease-in-out;
}

.validation-error:focus {
    border: 2px solid #dc3545 !important;
}

.header {
    background-color: #185c2a !important;
}

.datepicker .dow {
    text-align: center;
}

.datepicker .datepicker-switch {
    text-align: center;
}

.datepicker .day {
    padding: 4px;
    text-align: center;
}

.datepicker .day:hover {
    background: #61f072 !important;
    cursor: pointer;
}

.datepicker table tr td.disabled:hover {
    background: #fff !important;
    cursor: pointer;
}

.datepicker tr:hover {
    background-color: transparent !important;
}

.datepicker table tr td.active {
    background: #61f072 !important;
}

.datepicker .next {
    text-align: center;
    cursor: pointer;
}

.datepicker .prev {
    text-align: center;
    cursor: pointer;
}

@keyframes slam {
    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    50% {
        transform: translateX(5px);
    }

    75% {
        transform: translateX(-5px);
    }

    100% {
        transform: translateX(0);
    }
}

.input-group-addon:hover {
    text-align: center;
    cursor: pointer;
}

.field-error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.thresholdLine {
    fill: red;
    fill-opacity: 0;
    stroke-width: 2px;
    stroke: red;
}

.buyer-popup {
    min-width: 797px;
}

.modal-padding {
    padding: 30px !important;
}

.step-header {
    font-family: "Inter", sans-serif;
    padding-top: 10px;
    padding-bottom: 10px;
    gap: 10px;
}

.step-number {
    color: rgba(0, 0, 0, 0.55);
    font-size: 16px;
    font-weight: 400;
    line-height: 19.2px;
    letter-spacing: 0.16px;
}

.buyer-popup .step-title {
    color: #000 !important;
    font-size: 32px;
    font-weight: 700;
    line-height: 38.4px;
    letter-spacing: 0.32px;
    max-width: 460px;
}

.step-description {
    color: #000;
    font-size: 16px;
    font-weight: 400;
    line-height: 19.2px;
    letter-spacing: 0.16px;
    max-width: 620px;
}

#mapCanvas {
    width: 100%;
    max-width: 100%;
    margin-bottom: 20px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

#mapCanvas canvas {
    min-height: 500px !important;
    max-height: 500px !important;
}

.location-input-container {
    align-items: center;
    gap: 20px;
}

.esri-popup {
    z-index: 1060 !important;
}

.esri-widget__heading {
    font-size: 14px !important;
    font-family: Inter, sans-serif !important;
}

/* Целта е да позволите на съдържанието да скролира, ако е по-високо от наличното място */
.esri-feature-content {
    background-color: #4ba13e !important;
    color: #fff;
    font-size: 14px !important;
    max-height: 250px;
    /* Примерна максимална височина. Нагласете я според нуждите. */
    overflow-y: auto;
    /* Вертикален скролбар, ако съдържанието надвишава max-height */
    overflow-x: hidden;
    /* Скрива хоризонталния скролбар, освен ако не е абсолютно необходим */
}

/* Уверете се, че главният контейнер на попапа не пречи */
.esri-popup__main-container {
    /* Може да се наложи да се уверите, че този елемент няма фиксирана височина
       или overflow: hidden, което да отреже скролбара на съдържанието */
    height: auto !important;
    /* Ако е зададена фиксирана височина */
    overflow: visible !important;
    /* За да не скрива скролбара на .esri-popup__content */
}

.esri-features__container {
    min-height: 100px;
}

.esri-features__content-container {
    min-height: 100px;
}

#mapCanvasLoad {
    width: 305px;
    height: 400px;
    height: 325px;
    float: left;
}


.esri-header {
    background-color: #444 !important;
}

div:has(> .info-window) {
    height: fit-content;
    justify-content: center;
    display: flex;
}

.contract-info-labels{
    font-weight: 700;
    font-size: 1.1rem;
}

.info-window-container {
    display: block;
    width: 100%;
    clear: both;
    overflow-y: auto;
    padding-top: 5px;
    padding-bottom: 5px;
    font-family: Inter, sans-serif;
}

.info-window {
    display: grid;
    grid-template-columns: repeat(3, auto);
    gap: 10px;
    overflow-y: auto;
    justify-content: space-around;
    width: 100%;
    padding-top: 5px;
    padding-bottom: 5px;
    font-family: Inter, sans-serif;
}

.datepicker {
    z-index: 2000 !important;
}

.detect-location {
    border-radius: 5px;
    background: #4ba13e;
    color: #fff;
    text-align: center;
    font-family: Inter, sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 700;
    line-height: 120%;
    letter-spacing: 0.16px;
    text-transform: uppercase;
    padding: 0.5rem;
}

.detect-location:hover {
    border-radius: 5px;
    background: #61F072;
    color: #fff;
}

.detect-location:active {
    border-radius: 5px;
    background: #2ea93c !important;
    color: #fff !important;
}

.irs-single:after {
    content: "" !important;
    position: absolute !important;
    bottom: -9.5px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    border: 6px solid transparent !important;
    border-top-color: #444 !important;
    width: 10px;
}

.choose-heading {
    margin-top: 10px;
    color: #000;
    font-family: Inter, sans-serif;
    font-size: 32px;
    font-style: normal;
    font-weight: 700;
    line-height: 120%;
    letter-spacing: 0.32px;
    text-align: left;
}

.choose-event {
    color: #000;
    font-family: Inter, sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 120%;
    letter-spacing: 0.16px;
    text-align: left;
}

.weather-tab {
    padding: 10px;
    background: #f9f9f9;
    border: 1px solid rgba(0, 0, 0, 0.23);
    outline-offset: -1px;
    text-align: left;
    display: flex;
    align-items: center;
    width: 100%;
    transition: background-color 0.3s, outline 0.3s;
}

.weather-tab:hover,
.weather-tab.active {
    background-color: #e6f4e9;
    outline: 2px solid #4ba13e;
}

.weather-tab-inner {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
}

.weather-tab-icon {
    width: 24px;
    height: 24px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.weather-tab-label {
    color: #000;
    font-family: Inter, sans-serif;
    font-size: 11px;
    font-style: normal;
    font-weight: 500;
    line-height: 120%;
    letter-spacing: 0.11px;
    white-space: normal;
    word-break: break-word;
    max-width: calc(100% - 34px);
    transform: rotate(0.23deg);
}

.show-chart {
    width: 100%;
    background: #4ba13e;
    color: #fff;
    text-align: center;
    font-family: Inter, sans-serif;
    font-size: 14px;
    font-style: normal;
    font-weight: 700;
    line-height: 120%;
    padding: 10px !important;
    letter-spacing: 0.14px;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    border: none;
}

.show-chart:hover {
    width: 100%;
    background: #61F072 !important;
    color: #fff !important;
}

.show-chart:active {
    width: 100%;
    background: #61F072 !important;
    color: #fff !important;
}

.chart-title {
    padding-top: 30px;
    color: #000;
    font-family: Inter, sans-serif;
    font-size: 32px;
    font-style: normal;
    font-weight: 700;
    line-height: 120%;
    letter-spacing: 0.32px;
    text-align: left;
}

.chart-subtitle {
    color: #000;
    font-family: Inter, sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 120%;
    letter-spacing: 0.16px;
    text-align: left;
}

.chart-subtitle-second {
    color: #000;
    font-family: Inter, sans-serif;
    font-size: 20px;
    font-style: normal;
    font-weight: 700;
    line-height: 120%;
    letter-spacing: 0.2px;
    text-align: left;
}

.set-threshold-title {
    color: black;
    margin-top: 20px;
    font-size: 32px;
    font-family: Inter, sans-serif;
    font-weight: 700;
    line-height: 38.4px;
    letter-spacing: 0.32px;
    word-wrap: break-word;
    text-align: left;
}

/* Плъзгащата линия - активна част */
.irs-bar {
    background: #444 !important;
    height: 10px !important;
    border-radius: 10px !important;
}

/* Кръглия плъзгач */
.irs-handle {
    background: #444 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Tooltip над плъзгача */
.irs-single {
    background: #444 !important;
    color: #fff !important;
    font-weight: normal !important;
    border-radius: 6px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    margin-top: -20px;
    text-align: center;
}

.irs-grid-text {
    color: #444 !important;
    font-weight: 500;
    font-size: 14px;
}

.irs-grid-pol {
    background-color: #444 !important;
    /* или какъвто искаш цвят */
    opacity: 1;
    /* увери се, че не са полупрозрачни */
}

.buyer-popup .custom-checkbox {
    padding-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #000;
    user-select: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    position: relative;
    transition: all 0.2s ease-in-out;
}

.custom-checkbox input[type="checkbox"]:checked+.checkmark {
    background-color: #28a745;
    /* зелено */
    border-color: #28a745;
}

.buyer-popup .modal-addon {
    border-bottom-right-radius: 0px !important;
    border-top-right-radius: 0px !important;
    background: #4ba13e;
    border: none;
    color: #ffffff;
    font-weight: bold;
    font-size: 1rem;
    border-radius: 4px;
    transition: 0.3s 
ease-in-out;
}
.request-coverage-input{
    border-bottom-left-radius: 0px !important;
    border-top-left-radius: 0px !important;
}
.form-control{
    font-size: 0.95rem;
}
.form-control:focus {
    box-shadow: none !important;
}
.custom-checkbox input[type="checkbox"]:checked+.checkmark::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 5px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.btn-continue {
    background-color: #4ba13e;
    color: white;
    font-family: "Inter", sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 16.8px;
    letter-spacing: 0.14px;
    border-radius: 5px;
    padding: 10px;
    display: inline-flex;
    text-align: center;
    align-items: center !important;
    gap: 10px;
    border: none;
}

.btn-continue:hover {
    background-color: #61F072 !important;
    color: white !important;
}

.btn-continue .btn-icon::before {
    content: "";
    width: 14px;
    height: 12px;
    position: absolute;
    left: 5px;
    top: 6px;
    outline: 2px solid white;
    outline-offset: -1px;
}

.contract-step-3 {
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 10px;
    overflow: hidden;
}

.step-info-3 {
    font-size: 16px;
    font-family: "Inter", sans-serif;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: 0.16px;
    opacity: 0.55;
}

.step-title-3 {
    font-size: 32px;
    font-family: "Inter", sans-serif;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.32px;
    color: black;
    max-width: 457px;
}

.coverage-banner-3 {
    width: 100%;
    max-width: 697px;
    max-height: 49px;
    flex-shrink: 0;
    text-align: left;
    background: #4ba13e;
    padding: 10px 0;
}

.coverage-text-3 {
    padding-left: 20px;
    font-size: 16px;
    font-family: "Inter", sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    line-height: 120%;
    letter-spacing: 0.16px;
    max-width: 512px;
    color: #fff;
}

.contract-summary-3 {
    padding: 15px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contract-summary-3.border-bottom {
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
}

.summary-label-3,
.summary-value-3 {
    font-size: 20px;
    font-family: "Inter", sans-serif;
    font-weight: 400;
    line-height: 24px;
    letter-spacing: 0.2px;
    color: black;
}

.payout-box-3 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #f9f9f9;
    border: 1px solid #d4d4d4;
    padding: 5px 20px;
    width: 160px;
    height: 31px;
}

.payout-amount-3 {
    font-size: 20px;
    color: #4ba13e;
    font-family: "Inter", sans-serif;
}

.payout-icon-3 {
    width: 16px;
    height: 16px;
    background: #aaaaaa;
    clip-path: polygon(25% 10%, 50% 50%, 25% 90%);
}

.finalise-contract {
    padding: 10px !important;
    background: #4ba13e;
}

.finalise-contract:hover {
    background-color: #61F072 !important;
    color: white !important;
}

.vis-graph-group-dark {
    stroke: #185c2a !important;
}

.vis-graph-group-light {
    stroke: #3dc04c !important;
}

path.vis-graph-group-dark {
    fill: none !important;
}

path.vis-graph-group-light {
    fill: none !important;
}

circle.vis-graph-group-dark.vis-point {
    fill: #185c2a !important;
}

circle.vis-graph-group-light.vis-point {
    fill: #3dc04c !important;
}

@media screen and (max-width: 768px) {

    #mapCanvas canvas {
        min-height: 400px !important;
        max-height: 400px !important;
    }
    .detect-location {
        font-size: 0.8rem;
        padding: 0.67rem;
    }

    .contract-info-labels{
        display: block;
        font-size: 0.9rem;
    }
    .info-window{
        padding: 3px;
    }

    .buyer-popup {
        min-width: auto;
        margin: auto !important;
    }

    .modal-padding {
        padding: 20px !important;
    }

    .weather-tab {
        width: calc(50% - 5px);
        margin-bottom: 10px;
    }

    .weather-tab-inner {
        flex-direction: row;
        align-items: flex-start;
    }

    .weather-tab-label {
        font-size: 12px;
        word-break: break-word;
    }
}

.weather-tabs-row {
    width: 100%;
    margin: 0 auto 20px auto;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.weather-tab-box {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    padding: 10px;
    gap: 10px;
    width: 200px;
    height: 52px;
    background: #f9f9f9;
    border: 4px solid rgba(0, 0, 0, 0.23);
    box-sizing: border-box;
    text-decoration: none;
    transition: border 0.2s, background 0.2s;
    border-radius: 0;
}

.weather-tab-box.active,
.weather-tab-box:focus,
.weather-tab-box:hover {
    border: 4px solid #4ba13e;
    background: #f9f9f9;
    outline: none;
}

.weather-tab-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.weather-tab-label {
    font-family: "Inter", sans-serif;
    font-style: normal;
    font-weight: 500;
    font-size: 11px;
    line-height: 120%;
    letter-spacing: 0.01em;
    color: #000;
    transform: rotate(0.23deg);
    white-space: normal;
    word-break: break-word;
}

@media (max-width: 768px) {
    .info-window {
        width: 100%;
    }

    .weather-tabs-row {
        flex-wrap: wrap;
        gap: 8px;
    }

    .weather-tab-box {
        width: 48%;
        min-width: 140px;
        margin-bottom: 8px;
    }
}
