﻿.irregular-land-calculator {
    font-family: IRANYekan, Tahoma, sans-serif;
    width: 100%;
}

.land-calculator-box {
    width: 100%;
    overflow: hidden;
}

.land-help-box {
    line-height: 2;
}

.land-rotation-control {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.land-range-wrap {
    flex: 1;
    min-width: 0;
}

.land-number-wrap {
    width: 130px;
    position: relative;
}

    .land-number-wrap .input {
        padding-left: 32px;
        text-align: center;
    }

.land-unit {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #777;
    pointer-events: none;
}

.range-slider-input {
    width: 100%;
    cursor: pointer;
    accent-color: #3273dc;
}

.land-side-control {
    padding: 20px 0;
    border-bottom: 1px solid #eeeeee;
}

    .land-side-control:last-child {
        border-bottom: none;
    }

.land-side-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 18px;
}

.land-side-endpoints {
    display: block;
    color: #888;
    font-size: .78rem;
    margin-top: 4px;
}

.land-input-section {
    margin-top: 15px;
}

.land-control-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

    .land-control-label span {
        font-size: .78rem;
        font-weight: 400;
        color: #777;
        margin-right: 5px;
    }

.land-input-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.land-slider-column {
    flex: 1;
    min-width: 0;
}

.land-number-column {
    width: 190px;
    flex-shrink: 0;
}

.land-last-angle-info {
    margin-top: 15px;
    padding: 10px 14px;
    border-radius: 8px;
    background: #f5f7fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.land-passage-checkbox-label {
    display: flex;
    align-items: center;
    gap: 7px;
}

.land-passage-width-container {
    max-width: 420px;
}

.land-canvas-section {
    width: 100%;
}

.land-canvas-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    color: #444;
}

    .land-canvas-title span {
        color: #888;
        font-size: .8rem;
    }

.land-canvas-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 8px;
}

#landCanvas {
    display: block;
    width: 100%;
    height: auto;
    max-width: 900px;
    min-height: 300px;
    border-radius: 8px;
    background: #fff;
}

.land-result-card {
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    background: #fafafa;
    height: 100%;
}

    .land-result-card small {
        display: block;
        color: #777;
        margin-bottom: 7px;
    }

    .land-result-card strong {
        display: block;
        font-size: 1.05rem;
        word-break: break-word;
    }

.land-table-wrapper {
    overflow-x: auto;
}

#liveSidesTable td,
#liveSidesTable th {
    vertical-align: middle;
    white-space: nowrap;
}

#landShapeMessage {
    transition: all .2s ease;
}

@media (max-width: 768px) {

    .land-rotation-control {
        flex-direction: column;
        align-items: stretch;
    }

    .land-number-wrap {
        width: 100%;
    }

    .land-input-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .land-number-column {
        width: 100%;
    }

    .land-side-header {
        align-items: flex-start;
    }

        .land-side-header .tag {
            white-space: nowrap;
        }

    .land-canvas-wrapper {
        padding: 4px;
    }

    #landCanvas {
        min-height: 280px;
    }

    .land-canvas-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

@media (max-width: 480px) {

    .land-calculator-box {
        padding: 12px;
    }

    .land-side-control {
        padding: 16px 0;
    }

    .land-side-header {
        flex-direction: column;
        gap: 8px;
    }

    .land-result-card {
        padding: 12px 8px;
    }

        .land-result-card strong {
            font-size: .9rem;
        }
}
/* =========================================================
   چیدمان اطلاعات اضلاع
   دسکتاپ: دو ضلع در هر ردیف
   موبایل: یک ضلع در هر ردیف
========================================================= */

.irregular-land-calculator .land-sides-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
}

.irregular-land-calculator .land-side-control {
    width: 100%;
    min-width: 0;
    padding: 14px;
    border: 1px solid #eeeeee;
    border-radius: 10px;
    background: #fff;
    box-sizing: border-box;
}

/* موبایل */
@media screen and (max-width: 768px) {

    .irregular-land-calculator .land-sides-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .irregular-land-calculator .land-side-control {
        padding: 12px;
    }
}