/* =========================================
   SMARTMYTOOLS - AREA CALCULATOR
========================================= */


/* =========================================
   MAIN PAGE
========================================= */

.calculator-page {

    width: 100%;

    margin: 0;

    padding: 35px 20px 80px;

    background: #f5f7fb;

    box-sizing: border-box;
}


.calculator-page > .container {

    width: 100%;

    max-width: 1200px;

    margin: 0 auto;

    box-sizing: border-box;
}


/* =========================================
   BREADCRUMB
========================================= */

.breadcrumb {

    margin-bottom: 25px;

    font-size: 14px;

    color: #667085;
}


.breadcrumb a {

    color: #0f3b66;

    text-decoration: none;
}


.breadcrumb a:hover {

    text-decoration: underline;
}


.breadcrumb span {

    margin: 0 8px;

    color: #98a2b3;
}


/* =========================================
   TOP AD
========================================= */

.top-ad {

    width: 100%;

    min-height: 90px;

    margin-bottom: 30px;

    border: 1px dashed #cbd5e1;

    border-radius: 8px;

    background: #f8fafc;

    color: #94a3b8;

    display: flex;

    align-items: center;

    justify-content: center;

    box-sizing: border-box;

    font-size: 14px;
}


/* =========================================
   PAGE LAYOUT
========================================= */

.page-layout {

    width: 100%;

    max-width: 1200px;

    margin: 0 auto;

    padding: 0 0 50px;

    display: grid;

    grid-template-columns: minmax(0, 1fr) 300px;

    gap: 32px;

    align-items: start;

    box-sizing: border-box;

    overflow: visible;
}


.page-main-content {

    width: 100%;

    min-width: 0;

    box-sizing: border-box;

    overflow: visible;
}


/* =========================================
   STICKY SIDEBAR ADS
========================================= */

.ad-sidebar {

    width: 300px;

    display: flex;

    flex-direction: column;

    gap: 24px;

    align-self: start;

    position: sticky;

    top: 20px;

    box-sizing: border-box;
}


.ad-placeholder {

    width: 300px;

    min-height: 250px;

    border: 1px dashed #cbd5e1;

    border-radius: 8px;

    display: flex;

    align-items: center;

    justify-content: center;

    box-sizing: border-box;

    color: #94a3b8;

    font-size: 14px;

    background: #f8fafc;
}


/* =========================================
   AREA CALCULATOR HERO
========================================= */

.calculator-hero {

    text-align: center;

    margin-bottom: 30px;
}


.calculator-hero h1 {

    margin: 0 0 12px;

    font-size: 42px;

    color: #2f3e52;
}


.calculator-hero p {

    max-width: 750px;

    margin: 0 auto;

    font-size: 18px;

    line-height: 1.6;

    color: #526070;
}


/* =========================================
   INSTRUCTIONS
========================================= */

.calculator-instructions {

    margin-bottom: 25px;

    padding: 14px 18px;

    border: 1px solid #d9e0e7;

    border-radius: 8px;

    background: #ffffff;

    color: #2f3e52;

    display: flex;

    align-items: center;

    gap: 10px;

    box-sizing: border-box;
}


.calculator-instructions span {

    color: #24476b;

    font-size: 14px;
}


/* =========================================
   SHAPE CALCULATORS
========================================= */

.shape-calculator {

    width: 100%;

    margin-bottom: 25px;

    padding: 28px;

    background: #ffffff;

    border: 1px solid #d9e0e7;

    border-radius: 12px;

    box-sizing: border-box;
}


.shape-content {

    display: grid;

    grid-template-columns: minmax(0, 1fr) 220px;

    gap: 35px;

    align-items: center;
}


.shape-form {

    min-width: 0;
}


.shape-form h2 {

    margin: 0 0 24px;

    color: #2f3e52;

    font-size: 27px;
}


/* =========================================
   INPUTS
========================================= */

.input-group {

    margin-bottom: 18px;
}


.input-group label {

    display: block;

    margin-bottom: 8px;

    color: #2f3e52;

    font-size: 15px;

    font-weight: 600;
}


.input-with-unit {

    display: grid;

    grid-template-columns: minmax(0, 1fr) 130px;

    gap: 10px;
}


.input-with-unit input,
.input-with-unit select {

    width: 100%;

    min-width: 0;

    padding: 13px 14px;

    border: 1px solid #cfd8e3;

    border-radius: 8px;

    background: #ffffff;

    color: #2f3e52;

    font-size: 16px;

    box-sizing: border-box;
}


.input-with-unit input:focus,
.input-with-unit select:focus {

    outline: none;

    border-color: #0f3b66;

    box-shadow: 0 0 0 3px rgba(15, 59, 102, 0.10);
}


/* =========================================
   BUTTONS
========================================= */

.calculator-actions {

    display: flex;

    flex-wrap: wrap;

    gap: 12px;

    margin-top: 22px;
}


.calculator-actions .btn {

    min-height: 44px;

    padding: 11px 20px;

    border-radius: 8px;

    border: none;

    cursor: pointer;

    font-size: 15px;

    font-weight: 700;
}


.calculator-actions .btn-primary {

    background: #ff3131;

    color: #ffffff;
}


.calculator-actions .btn-primary:hover {

    background: #e62828;
}


.calculator-actions .btn-secondary {

    background: #eef1f5;

    color: #2f3e52;

    border: 1px solid #d9e0e7;
}


.calculator-actions .btn-secondary:hover {

    background: #e3e8ef;
}


/* =========================================
   RESULTS
========================================= */

.shape-result {

    margin-top: 20px;

    padding: 15px 18px;

    border-radius: 8px;

    background: #f5f7fb;

    border: 1px solid #d9e0e7;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;
}


.shape-result span {

    color: #526070;

    font-size: 15px;

    font-weight: 600;
}


.shape-result strong {

    color: #0f3b66;

    font-size: 20px;
}


/* =========================================
   SHAPE DIAGRAMS
========================================= */

.shape-diagram {

    min-height: 180px;

    display: flex;

    align-items: center;

    justify-content: center;
}


/* Rectangle */

.rectangle-shape {

    width: 150px;

    height: 100px;

    border: 3px solid #24476b;

    background: #eef4fa;

}


/* Triangle */

.triangle-shape {

    width: 0;

    height: 0;

    border-left: 80px solid transparent;

    border-right: 80px solid transparent;

    border-bottom: 140px solid #24476b;
}


/* Trapezoid */

.trapezoid-shape {

    width: 130px;

    height: 90px;

    background: #eef4fa;

    border: 3px solid #24476b;

    clip-path: polygon(20% 0, 80% 0, 100% 100%, 0 100%);
}


/* Circle */

.circle-shape {

    width: 145px;

    height: 145px;

    border-radius: 50%;

    border: 3px solid #24476b;

    background: #eef4fa;
}


/* Sector */

.sector-shape {

    width: 145px;

    height: 145px;

    border-radius: 100% 0 0 0;

    border: 3px solid #24476b;

    background: #eef4fa;
}


/* Ellipse */

.ellipse-shape {

    width: 170px;

    height: 105px;

    border-radius: 50%;

    border: 3px solid #24476b;

    background: #eef4fa;
}


/* Parallelogram */

.parallelogram-shape {

    width: 155px;

    height: 95px;

    transform: skew(-18deg);

    border: 3px solid #24476b;

    background: #eef4fa;
}


/* =========================================
   INFORMATION
========================================= */

.calculator-info {

    margin-top: 40px;

    padding: 30px;

    background: #ffffff;

    border: 1px solid #d9e0e7;

    border-radius: 12px;

    box-sizing: border-box;
}


.calculator-info h2 {

    margin: 0 0 18px;

    color: #2f3e52;

    font-size: 28px;
}


.calculator-info p {

    margin: 0 0 25px;

    color: #526070;

    line-height: 1.7;
}


/* =========================================
   FORMULA LIST
========================================= */

.formula-list {

    display: grid;

    gap: 10px;

    margin-bottom: 30px;
}


.formula-item {

    padding: 13px 16px;

    border: 1px solid #d9e0e7;

    border-radius: 8px;

    background: #f8fafc;

    color: #526070;

    line-height: 1.6;
}


.formula-item strong {

    color: #2f3e52;
}


/* =========================================
   TABLE
========================================= */

.table-responsive {

    width: 100%;

    overflow-x: auto;
}


.calculator-table {

    width: 100%;

    border-collapse: collapse;

    font-size: 15px;
}


.calculator-table th,
.calculator-table td {

    padding: 12px 14px;

    border: 1px solid #d9e0e7;

    text-align: left;
}


.calculator-table th {

    background: #eef1f5;

    color: #2f3e52;

    font-weight: 700;
}


.calculator-table td {

    color: #526070;

    background: #ffffff;
}


/* =========================================
   FAQ
========================================= */

.faq-section {

    margin-top: 40px;

    padding: 30px;

    background: #ffffff;

    border: 1px solid #d9e0e7;

    border-radius: 12px;

    box-sizing: border-box;
}


.faq-section h2 {

    margin: 0 0 20px;

    color: #2f3e52;

    font-size: 28px;
}


.faq-item {

    padding: 18px 0;

    border-bottom: 1px solid #d9e0e7;
}


.faq-item:last-child {

    border-bottom: none;
}


.faq-item h3 {

    margin: 0 0 10px;

    color: #2f3e52;

    font-size: 17px;
}


.faq-item p {

    margin: 0;

    color: #526070;

    line-height: 1.7;
}


/* =========================================
   DISCLAIMER
========================================= */

.calculator-disclaimer {

    margin-top: 30px;

    padding: 30px;

    background: #ffffff;

    border-radius: 10px;

    box-sizing: border-box;
}


.calculator-disclaimer h2 {

    margin: 0 0 15px;

    color: #0f3b66;

    font-size: 27px;
}


.calculator-disclaimer p {

    margin: 0;

    color: #526070;

    line-height: 1.7;
}


/* =========================================
   DESKTOP BOTTOM STICKY AD
========================================= */

.bottom-sticky-ad {

    display: flex;

    position: fixed;

    left: 50%;

    bottom: 0;

    transform: translateX(-50%);

    width: min(970px, calc(100% - 40px));

    min-height: 90px;

    z-index: 9998;

    align-items: center;

    justify-content: center;

    box-sizing: border-box;

    border: 1px solid #d9e0e7;

    border-bottom: none;

    border-radius: 8px 8px 0 0;

    background: #eef1f5;

    color: #94a3b8;

    font-size: 14px;
}


/* =========================================
   DESKTOP FOOTER CLEARANCE
========================================= */

@media (min-width: 601px) {

    .site-footer {

        padding-bottom: 130px;

    }

}


/* =========================================
   TABLET
========================================= */

@media (max-width: 1100px) {

    .page-layout {

        grid-template-columns: 1fr;

        gap: 24px;

    }


    .ad-sidebar {

        position: static;

        width: 100%;

        flex-direction: row;

        gap: 24px;

    }


    .ad-placeholder {

        flex: 1;

        width: auto;

        min-height: 180px;

    }


    .shape-content {

        grid-template-columns: minmax(0, 1fr) 180px;

        gap: 25px;

    }

}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 768px) {

    .calculator-page {

        padding: 30px 15px 60px;

    }


    .top-ad {

        min-height: 90px;

        margin-bottom: 24px;

    }


    .page-layout {

        display: flex;

        flex-direction: column;

        width: 100%;

        padding: 0 0 35px;

        gap: 24px;

        overflow: visible;

    }


    .page-main-content {

        width: 100%;

        min-width: 0;

    }


    .ad-sidebar {

        position: static;

        width: 100%;

        display: none;

    }


    .calculator-hero {

        margin-bottom: 25px;

    }


    .calculator-hero h1 {

        font-size: 32px;

    }


    .calculator-hero p {

        font-size: 16px;

    }


    .calculator-instructions {

        font-size: 14px;

    }


    .shape-calculator {

        padding: 22px;

    }


    .shape-content {

        grid-template-columns: 1fr;

        gap: 20px;

    }


    .shape-form h2 {

        font-size: 24px;

    }


    .shape-diagram {

        min-height: 150px;

        order: 2;

    }


    .input-with-unit {

        grid-template-columns: minmax(0, 1fr) 115px;

    }


    .calculator-info,
    .faq-section,
    .calculator-disclaimer {

        padding: 22px;

    }


    .calculator-info h2,
    .faq-section h2 {

        font-size: 25px;

    }


    .calculator-disclaimer h2 {

        font-size: 24px;

    }


    .bottom-sticky-ad {

        left: 0;

        right: 0;

        bottom: 0;

        transform: none;

        width: 100%;

        min-height: 60px;

        border-radius: 0;

        border-left: none;

        border-right: none;

        border-bottom: none;

        border-top: 1px solid #d9e0e7;

        z-index: 9999;

    }


    .site-footer {

        padding-bottom: 85px;

    }

}


/* =========================================
   SMALL MOBILE
========================================= */

@media (max-width: 480px) {

    .calculator-page {

        padding-left: 10px;

        padding-right: 10px;

    }


    .calculator-hero h1 {

        font-size: 28px;

    }


    .calculator-hero p {

        font-size: 15px;

    }


    .shape-calculator {

        padding: 18px;

    }


    .shape-form h2 {

        font-size: 22px;

    }


    .input-with-unit {

        grid-template-columns: 1fr;

        gap: 8px;

    }


    .calculator-actions {

        flex-direction: column;

    }


    .calculator-actions .btn {

        width: 100%;

    }


    .shape-diagram {

        min-height: 130px;

    }


    .calculator-info,
    .faq-section,
    .calculator-disclaimer {

        padding: 18px;

    }


    .calculator-table {

        min-width: 500px;

    }

}

/* =========================================
   DESKTOP WIDTH FIX
========================================= */

@media (min-width: 1101px) {

    .calculator-page {
        width: 100%;
        max-width: none;
    }

    .calculator-page > .container {
        width: 100%;
        max-width: 1200px;
        margin: 0 auto;
    }

    .page-layout {
        width: 100%;
        max-width: 1200px;
        margin: 0 auto;
    }

}
/* =========================================
   RESULT ACTION BUTTONS
   ========================================= */

.result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.result-action-btn {
    padding: 9px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #1e3a5f;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Hover */
.result-action-btn:hover {
    background: #f1f5f9;
    border-color: #2563eb;
    color: #2563eb;
    transform: translateY(-1px);
}

/* Click */
.result-action-btn:active {
    transform: translateY(0);
}

/* Mobile */
@media (max-width: 480px) {

    .result-actions {
        gap: 8px;
    }

    .result-action-btn {
        font-size: 13px;
        padding: 8px 11px;
    }
}