/* ==============================================================
   TRANSFERIT
   IP & PORT CHECKER
   Compact Professional UI
   ============================================================== */


/* ==============================================================
   PAGE
   ============================================================== */

.pc-page {
    min-height: calc(100vh - 120px);

    background:
        radial-gradient(
            circle at 10% 10%,
            rgba(13, 110, 253, 0.08),
            transparent 30%
        ),
        #f6f8fb;
}


.pc-tool {
   padding: 24px 0 25px;
}


/* ==============================================================
   MAIN PANEL
   ============================================================== */

.pc-panel {
    width: 100%;
    max-width: 1125px;

    margin: 0 auto;

    padding: 38px;

    background: #ffffff;

    border: 1px solid #e1e7ef;

    border-radius: 22px;

    box-shadow:
        0 25px 65px rgba(
            30,
            55,
            90,
            0.08
        );
}


/* ==============================================================
   HEADER
   ============================================================== */

.pc-header {
    display: flex;

    align-items: center;

    gap: 20px;

    margin-bottom: 10px;
}


.pc-header-icon {
    display: flex;

    align-items: center;

    justify-content: center;

    width: 68px;
    height: 68px;

    flex: 0 0 68px;

    border-radius: 17px;

    background: #edf4ff;

    color: #0d6efd;
}


.pc-header-icon svg {
    width: 36px;
    height: 36px;
}


.pc-eyebrow {
    margin-bottom: 4px;

    color: #0d6efd;

    font-size: 11px;

    font-weight: 800;

    letter-spacing: 1.4px;
}


.pc-header h1 {
    margin: 0;

    color: #172033;

    font-size: 25px;

    line-height: 1.15;

    font-weight: 800;
}


.pc-header p {
    margin: 7px 0 0;

    color: #788497;

    font-size: 12px;
}


/* ==============================================================
   MODE SELECTOR
   ============================================================== */

.pc-mode {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 7px;

    margin-bottom: 12px;

    padding: 6px;

    background: #f2f5f9;

    border-radius: 14px;
}


.pc-mode-btn {
    display: flex;

    align-items: center;

    gap: 14px;

    min-height: 62px;

    padding: 10px 18px;

    border: 1px solid transparent;

    border-radius: 11px;

    background: transparent;

    color: #657286;

    text-align: left;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        color 0.2s ease;
}


.pc-mode-btn:hover {
    color: #172033;
}


.pc-mode-btn.active {
    background: #ffffff;

    border-color: #dce3ec;

    color: #172033;

    box-shadow:
        0 5px 14px rgba(
            30,
            50,
            80,
            0.07
        );
}


.pc-mode-icon {
    display: flex;

    align-items: center;

    justify-content: center;

    width: 48px;
    height: 48px;

    flex: 0 0 48px;

    border-radius: 12px;

    background: #edf4ff;

    color: #0d6efd;

    font-size: 11px;

    font-weight: 800;
}


.pc-mode-content strong {
    display: block;

    color: inherit;

    font-size: 14px;

    font-weight: 800;
}


.pc-mode-content small {
    display: block;

    margin-top: 4px;

    color: #8792a2;

    font-size: 11px;
}


/* ==============================================================
   FORM GRID
   ============================================================== */

.pc-form-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1.4fr)
        minmax(250px, 0.8fr);

    gap: 18px;

    align-items: start;
}


.pc-field label {
    display: block;

    margin-bottom: 9px;

    color: #273246;

    font-size: 13px;

    font-weight: 800;
}


.pc-optional {
    display: inline-block;

    margin-left: 6px;

    color: #9aa3b1;

    font-size: 9px;

    font-weight: 600;
}


.pc-input-wrap {
    position: relative;
}


.pc-input-icon {
    position: absolute;

    top: 50%;
    left: 16px;

    z-index: 2;

    transform: translateY(-50%);

    color: #8290a3;

    font-size: 15px;

    font-weight: 700;

    pointer-events: none;
}


.pc-input-wrap input,
.pc-input-wrap select {
    width: 100%;

    height: 52px;

    padding:
        0
        15px
        0
        43px;

    border:
        1px solid #d7dfe9;

    border-radius: 11px;

    outline: none;

    background: #ffffff;

    color: #273246;

    font-family: inherit;

    font-size: 13px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


.pc-input-wrap input::placeholder {
    color: #9aa5b4;
}


.pc-input-wrap input:focus,
.pc-input-wrap select:focus {
    border-color: #0d6efd;

    box-shadow:
        0 0 0 3px
        rgba(
            13,
            110,
            253,
            0.09
        );
}


.pc-input-wrap select {
    cursor: pointer;
}


.pc-field > small {
    display: block;

    margin-top: 7px;

    color: #8a95a5;

    font-size: 10px;

    line-height: 1.4;
}


/* ==============================================================
   CURRENT IP
   ============================================================== */

.pc-current-ip {
    display: flex;

    align-items: center;

    gap: 7px;

    min-height: 20px;

    margin-top: 5px;

    color: #7d8796;

    font-size: 10px;
}


.pc-current-ip-dot {
    width: 6px;
    height: 6px;

    flex: 0 0 6px;

    border-radius: 50%;

    background: #198754;

    box-shadow:
        0 0 0 3px
        rgba(
            25,
            135,
            84,
            0.08
        );
}


.pc-current-ip strong {
    color: #344054;

    font-weight: 750;
}


#useCurrentIp {
    margin-left: auto;

    padding: 0;

    border: 0;

    background: transparent;

    color: #0d6efd;

    font-family: inherit;

    font-size: 10px;

    font-weight: 750;

    cursor: pointer;
}


#useCurrentIp:hover {
    text-decoration: underline;
}


/* ==============================================================
   CHECK BUTTON
   ============================================================== */

.pc-check-btn {
    display: flex;

    align-items: center;

    justify-content: center;

    gap: 9px;

    width: 100%;

    height: 54px;

    margin-top: 12px;

    padding: 0 20px;

    border: 0;

    border-radius: 11px;

    background: #0d6efd;

    color: #ffffff;

    font-family: inherit;

    font-size: 14px;

    font-weight: 800;

    cursor: pointer;

    box-shadow:
        0 8px 22px
        rgba(
            13,
            110,
            253,
            0.22
        );

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


.pc-check-btn:hover {
    background: #0b5ed7;

    transform: translateY(-1px);

    box-shadow:
        0 10px 25px
        rgba(
            13,
            110,
            253,
            0.26
        );
}


.pc-check-btn:active {
    transform: translateY(0);
}


.pc-check-btn:disabled {
    opacity: 0.68;

    cursor: wait;

    transform: none;
}


.pc-check-btn svg {
    width: 19px;
    height: 19px;
}


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

.pc-error {
    display: flex;

    align-items: center;

    gap: 10px;

    margin-top: 10px;

    padding: 13px 15px;

    border:
        1px solid #f0c7c5;

    border-radius: 10px;

    background: #fff6f5;

    color: #a52f2b;

    font-size: 12px;
}


.pc-error-icon {
    display: flex;

    align-items: center;

    justify-content: center;

    width: 23px;
    height: 23px;

    flex: 0 0 23px;

    border-radius: 50%;

    background: #dc3545;

    color: #ffffff;

    font-size: 12px;

    font-weight: 800;
}


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

.pc-result {
    margin-top: 24px;

    padding: 20px;

    border: 1px solid;

    border-radius: 14px;

    animation:
        pcResultIn 0.3s ease;
}


@keyframes pcResultIn {

    from {
        opacity: 0;

        transform:
            translateY(7px);
    }

    to {
        opacity: 1;

        transform:
            translateY(0);
    }

}


/* ==============================================================
   OPEN
   ============================================================== */

.pc-result-open {
    border-color: #b7dfc7;

    background: #f2fbf5;
}


/* ==============================================================
   CLOSED
   ============================================================== */

.pc-result-closed {
    border-color: #efc1c1;

    background: #fff5f5;
}


/* ==============================================================
   VALID IP
   ============================================================== */

.pc-result-valid {
    border-color: #bdd6f5;

    background: #f4f8ff;
}


/* ==============================================================
   RESULT HEADER
   ============================================================== */

.pc-result-top {
    display: flex;

    align-items: center;

    gap: 13px;
}


.pc-result-status-icon {
    display: flex;

    align-items: center;

    justify-content: center;

    width: 46px;
    height: 46px;

    flex: 0 0 46px;

    border-radius: 12px;
}


.pc-result-status-icon svg {
    width: 25px;
    height: 25px;
}


.pc-result-open
.pc-result-status-icon,
.pc-result-valid
.pc-result-status-icon {
    background: #d9f3e2;

    color: #198754;
}


.pc-result-closed
.pc-result-status-icon {
    background: #fbdede;

    color: #dc3545;
}


.pc-result-label {
    display: block;

    margin-bottom: 3px;

    color: #8993a1;

    font-size: 9px;

    font-weight: 800;

    letter-spacing: 1px;
}


.pc-result-title {
    display: block;

    color: #263246;

    font-size: 16px;

    font-weight: 800;
}


.pc-status-pill {
    margin-left: auto;

    padding:
        7px
        13px;

    border-radius: 30px;

    font-size: 10px;

    font-weight: 850;

    letter-spacing: 0.3px;
}


.pc-result-open
.pc-status-pill,
.pc-result-valid
.pc-status-pill {
    background: #d7f1e0;

    color: #167342;
}


.pc-result-closed
.pc-status-pill {
    background: #f8dada;

    color: #a92d2d;
}


/* ==============================================================
   RESULT DETAILS
   ============================================================== */

.pc-result-details {
    display: flex;

    gap: 0;

    margin-top: 17px;

    padding-top: 15px;

    border-top:
        1px solid
        rgba(
            100,
            120,
            145,
            0.15
        );
}


.pc-result-details > div {
    flex: 1;

    min-width: 0;

    padding-right: 18px;
}


.pc-result-details > div + div {
    padding-left: 18px;

    border-left:
        1px solid
        rgba(
            100,
            120,
            145,
            0.15
        );
}


.pc-result-details span {
    display: block;

    margin-bottom: 4px;

    color: #8792a2;

    font-size: 9px;

    font-weight: 750;

    text-transform: uppercase;

    letter-spacing: 0.5px;
}


.pc-result-details strong {
    display: block;

    overflow: hidden;

    color: #344054;

    font-size: 12px;

    font-weight: 750;

    text-overflow: ellipsis;

    white-space: nowrap;
}


/* ==============================================================
   PORT ERROR DETAIL
   ============================================================== */

.pc-result-error {
    margin-top: 13px;

    padding-top: 11px;

    border-top:
        1px solid
        rgba(
            170,
            70,
            70,
            0.12
        );

    color: #9e4848;

    font-size: 10px;
}


/* ==============================================================
   FOOTER INFO
   ============================================================== */

.pc-footer-info {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    margin-top: 18px;

    color: #8b95a4;

    font-size: 10px;
}


.pc-footer-info span {
    display: flex;

    align-items: center;

    gap: 6px;
}


.pc-footer-info i {
    display: block;

    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: #198754;
}


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

@media (max-width: 900px) {

    .pc-tool {
        padding:
            30px
            15px
            40px;
    }


    .pc-panel {
        padding: 28px;
    }


    .pc-form-grid {
        grid-template-columns:
            1fr
            1fr;
    }

}


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

@media (max-width: 680px) {

    .pc-tool {
        padding:
            18px
            10px
            30px;
    }


    .pc-panel {
        padding: 20px;

        border-radius: 16px;
    }


    .pc-header {
        gap: 13px;

        margin-bottom: 20px;
    }


    .pc-header-icon {
        width: 48px;
        height: 48px;

        flex-basis: 48px;

        border-radius: 13px;
    }


    .pc-header-icon svg {
        width: 27px;
        height: 27px;
    }


    .pc-eyebrow {
        font-size: 9px;
    }


    .pc-header h1 {
        font-size: 22px;
    }


    .pc-header p {
        font-size: 11px;
    }


    .pc-mode {
        grid-template-columns: 1fr;
    }


    .pc-mode-btn {
        min-height: 60px;
    }


    .pc-form-grid {
        grid-template-columns: 1fr;
    }


    .pc-result-details {
        flex-direction: column;

        gap: 13px;
    }


    .pc-result-details > div,
    .pc-result-details > div + div {
        padding:
            0 !important;

        border:
            0 !important;
    }


    .pc-footer-info {
        align-items: flex-start;

        flex-direction: column;
    }

}


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

@media (max-width: 420px) {

    .pc-panel {
        padding: 16px;
    }


    .pc-header h1 {
        font-size: 20px;
    }


    .pc-header p {
        font-size: 10px;
    }


    .pc-result {
        padding: 16px;
    }


    .pc-result-title {
        font-size: 13px;
    }


    .pc-status-pill {
        padding:
            6px
            9px;

        font-size: 8px;
    }


    .pc-current-ip {
        flex-wrap: wrap;
    }


    #useCurrentIp {
        margin-left: 13px;
    }

}