/* =========================================================
   VSUN APPLIANCES ADDON
   Varena Sun Energy
   Version: 1.2.0
========================================================= */

/* =========================================================
   ESTIMATE WARNING
========================================================= */

.vsun-estimate-warning {
    display: flex;
    align-items: flex-start;

    gap: 13px;

    width: 100%;

    margin-bottom: 22px;
    padding: 16px 18px;

    background:
        linear-gradient(
            135deg,
            #fffaf0 0%,
            #fff6dc 100%
        );

    border: 1px solid rgba(255, 176, 0, 0.3);
    border-right: 5px solid var(--vsun-primary);
    border-radius: 13px;

    color: var(--vsun-text);
}

.vsun-estimate-warning-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    width: 34px;
    height: 34px;

    background: #ffffff;

    border: 1px solid rgba(255, 176, 0, 0.25);
    border-radius: 50%;

    font-size: 18px;
    line-height: 1;
}

.vsun-estimate-warning > div {
    flex: 1;

    min-width: 0;
}

.vsun-estimate-warning strong {
    display: block;

    margin-bottom: 5px;

    color: #9a6200;

    font-size: 14.5px;
    font-weight: 850;
    line-height: 1.7;
}

.vsun-estimate-warning p {
    margin: 0;

    color: #72551a;

    font-size: 13.5px;
    line-height: 1.9;
}

/* =========================================================
   APPLIANCES INTRO
========================================================= */

.vsun-appliances-intro {
    margin-bottom: 20px;
}

.vsun-appliances-intro h3 {
    margin: 0 0 7px;

    color: var(--vsun-text);

    font-size: 18px;
    font-weight: 850;
    line-height: 1.7;
}

.vsun-appliances-intro p {
    margin: 0;

    color: var(--vsun-text-light);

    font-size: 13.5px;
    line-height: 1.9;
}

/* =========================================================
   APPLIANCES LIST
========================================================= */

.vsun-appliances-list {
    width: 100%;
}

/* =========================================================
   TOOLBAR
========================================================= */

.vsun-appliance-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 16px;

    width: 100%;

    margin-bottom: 16px;
}

.vsun-appliance-toolbar p {
    flex: 1;

    margin: 0;

    color: var(--vsun-text-light);

    font-size: 13.5px;
    line-height: 1.8;
}

.vsun-appliance-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    min-height: 38px;

    padding: 8px 13px;

    background: #ffffff;
    color: var(--vsun-danger);

    border: 1px solid rgba(220, 38, 38, 0.25);
    border-radius: 9px;

    font-family: inherit;
    font-size: 12.5px;
    font-weight: 750;

    cursor: pointer;

    transition: var(--vsun-transition);
}

.vsun-appliance-clear:hover {
    background: var(--vsun-danger-light);

    border-color: var(--vsun-danger);

    transform: translateY(-1px);

    box-shadow:
        0 5px 14px rgba(220, 38, 38, 0.1);
}

/* =========================================================
   APPLIANCE ROWS
========================================================= */

.vsun-appliance-rows {
    display: grid;

    gap: 14px;

    width: 100%;
}

/* =========================================================
   APPLIANCE ROW
========================================================= */

.vsun-appliance-row {
    position: relative;

    width: 100%;

    background: #ffffff;

    border: 1px solid var(--vsun-border);
    border-radius: 14px;

    overflow: hidden;

    transition: var(--vsun-transition);
}

.vsun-appliance-row::before {
    content: "";

    position: absolute;

    top: 0;
    right: 0;

    width: 4px;
    height: 100%;

    background: transparent;

    transition: var(--vsun-transition);
}

.vsun-appliance-row:hover {
    border-color: var(--vsun-primary);

    box-shadow: var(--vsun-shadow-small);
}

.vsun-appliance-row:hover::before {
    background: var(--vsun-primary);
}

/* =========================================================
   SELECTED APPLIANCE
========================================================= */

.vsun-appliance-row.selected {
    border-color: var(--vsun-secondary);

    box-shadow:
        0 8px 22px rgba(6, 70, 184, 0.11);
}

.vsun-appliance-row.selected::before {
    background: var(--vsun-secondary);
}

.vsun-appliance-row.selected
.vsun-appliance-select strong {
    color: var(--vsun-secondary);
}

/* =========================================================
   APPLIANCE MAIN
========================================================= */

.vsun-appliance-main {
    padding: 17px 18px;
}

/* =========================================================
   APPLIANCE SELECT
========================================================= */

.vsun-appliance-select {
    display: flex;
    align-items: center;

    gap: 9px;

    width: 100%;

    margin-bottom: 15px;

    cursor: pointer;
}

.vsun-appliance-select input {
    flex: 0 0 auto;

    width: 19px;
    height: 19px;

    margin: 0;

    accent-color: var(--vsun-secondary);

    cursor: pointer;
}

.vsun-appliance-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    width: 28px;
    height: 28px;

    font-size: 22px;
    line-height: 1;
}

.vsun-appliance-select strong {
    color: var(--vsun-text);

    font-size: 15.5px;
    font-weight: 850;
    line-height: 1.7;

    transition: var(--vsun-transition);
}

/* =========================================================
   APPLIANCE FIELDS
========================================================= */

.vsun-appliance-fields {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    align-items: end;

    gap: 11px;

    width: 100%;
}

.vsun-appliance-fields > label {
    display: grid;

    gap: 6px;

    min-width: 0;
}

.vsun-appliance-fields > label > span {
    color: var(--vsun-text-light);

    font-size: 12px;
    font-weight: 700;
    line-height: 1.6;
}

/* =========================================================
   INPUTS
========================================================= */

.vsun-appliance-fields input {
    width: 100%;
    min-width: 0;
    height: 42px;

    padding: 8px 10px;

    background: #ffffff;
    color: var(--vsun-text);

    border: 1px solid var(--vsun-border-dark);
    border-radius: 9px;

    outline: 0;

    font-size: 13.5px;
    font-weight: 650;

    direction: ltr;
    text-align: center;

    transition: var(--vsun-transition);
}

.vsun-appliance-fields input:hover {
    border-color: #aeb8c6;
}

.vsun-appliance-fields input:focus {
    border-color: var(--vsun-secondary);

    box-shadow:
        0 0 0 3px rgba(6, 70, 184, 0.09);
}

/* =========================================================
   MINI INPUT WITH UNIT
========================================================= */

.vsun-mini-input {
    display: flex;
    align-items: stretch;

    width: 100%;
}

.vsun-mini-input input {
    flex: 1;

    border-radius: 0 9px 9px 0;
}

.vsun-mini-input small {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    min-width: 44px;

    padding: 0 7px;

    background: #f1f5f9;
    color: var(--vsun-text-light);

    border: 1px solid var(--vsun-border-dark);
    border-right: 0;
    border-radius: 9px 0 0 9px;

    font-size: 11px;
    font-weight: 750;
    white-space: nowrap;
}

/* =========================================================
   STANDARD VALUE NOTE
========================================================= */

.vsun-standard-value-note {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 42px;

    padding: 8px 10px;

    background: var(--vsun-primary-light);
    color: #9a6200;

    border: 1px solid rgba(255, 176, 0, 0.22);
    border-radius: 9px;

    font-size: 11.5px;
    font-weight: 750;
    line-height: 1.5;

    text-align: center;
}

/* =========================================================
   APPLIANCE RESULT
========================================================= */

.vsun-appliance-result {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;

    gap: 10px;

    width: 100%;

    padding: 11px 18px;

    background: #f8fafc;

    border-top: 1px solid var(--vsun-border);

    color: var(--vsun-text-light);

    font-size: 12.5px;
    line-height: 1.7;
}

.vsun-appliance-result span {
    display: inline-flex;
    align-items: center;

    gap: 4px;
}

.vsun-appliance-result strong {
    color: var(--vsun-secondary);

    font-size: 13px;
    font-weight: 850;
}

/* =========================================================
   SUMMARY
========================================================= */

.vsun-appliance-summary {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 12px;

    width: 100%;

    margin-top: 19px;
}

.vsun-appliance-summary > div {
    display: grid;

    gap: 7px;

    min-height: 88px;

    padding: 15px;

    background:
        linear-gradient(
            135deg,
            var(--vsun-secondary-light) 0%,
            #f7faff 100%
        );

    border: 1px solid rgba(6, 70, 184, 0.12);
    border-radius: 12px;
}

.vsun-appliance-summary span {
    color: var(--vsun-text-light);

    font-size: 12.5px;
    line-height: 1.6;
}

.vsun-appliance-summary strong {
    color: var(--vsun-secondary);

    font-size: 16px;
    font-weight: 850;
    line-height: 1.7;
}

.vsun-appliance-summary b {
    font: inherit;
}

/* =========================================================
   EMPTY ERROR
========================================================= */

#vsun-appliances-empty-error {
    margin-top: 17px;
}

/* =========================================================
   DISABLED VISUAL STATE
========================================================= */

.vsun-appliance-row:not(.selected)
.vsun-appliance-fields {
    opacity: 0.78;
}

.vsun-appliance-row.selected
.vsun-appliance-fields {
    opacity: 1;
}

/* =========================================================
   FOCUS
========================================================= */

.vsun-appliance-select:focus-within,
.vsun-appliance-clear:focus-visible {
    outline: 3px solid rgba(6, 70, 184, 0.2);
    outline-offset: 3px;
}

/* =========================================================
   TABLET
========================================================= */

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

    .vsun-appliance-fields {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .vsun-appliance-summary {
        grid-template-columns: 1fr;
    }

    .vsun-appliance-summary > div {
        min-height: auto;
    }
}

/* =========================================================
   MOBILE
========================================================= */

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

    .vsun-estimate-warning {
        padding: 14px;

        gap: 10px;
    }

    .vsun-estimate-warning-icon {
        width: 31px;
        height: 31px;

        font-size: 16px;
    }

    .vsun-estimate-warning strong {
        font-size: 13.5px;
    }

    .vsun-estimate-warning p {
        font-size: 12.8px;
    }

    .vsun-appliance-toolbar {
        flex-direction: column;
        align-items: stretch;

        gap: 11px;
    }

    .vsun-appliance-clear {
        width: 100%;
    }

    .vsun-appliance-main {
        padding: 15px 14px;
    }

    .vsun-appliance-fields {
        grid-template-columns: 1fr;
    }

    .vsun-appliance-result {
        flex-direction: column;

        padding: 11px 14px;
    }

    .vsun-appliance-summary {
        gap: 10px;
    }
}

/* =========================================================
   VERY SMALL MOBILE
========================================================= */

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

    .vsun-estimate-warning {
        flex-direction: column;
    }

    .vsun-appliance-select {
        align-items: flex-start;
    }

    .vsun-appliance-select strong {
        font-size: 14.5px;
    }

    .vsun-appliance-fields input {
        height: 40px;
    }

    .vsun-mini-input small {
        min-width: 40px;

        font-size: 10.5px;
    }

    .vsun-standard-value-note {
        min-height: 40px;

        font-size: 11px;
    }
}

/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .vsun-appliance-row,
    .vsun-appliance-clear,
    .vsun-appliance-fields input,
    .vsun-appliance-row::before,
    .vsun-appliance-select strong {
        transition: none;
    }
}