/* =========================================================
   IMAGE RESIZER NEW TOOL
   CLEAN + COMPACT PREMIUM UI
   ========================================================= */

.irnt-wrapper {
    --irnt-primary: #111827;
    --irnt-primary-hover: #1f2937;
    --irnt-blue: #2563eb;
    --irnt-blue-light: #eff6ff;
    --irnt-text: #101828;
    --irnt-muted: #667085;
    --irnt-light: #f8fafc;
    --irnt-border: #e4e7ec;
    --irnt-success: #16a34a;
    --irnt-success-bg: #ecfdf3;

    width: 100%;
    max-width: 680px;

    margin: 25px auto;
    padding: 0 10px 30px;

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;

    color: var(--irnt-text);
    box-sizing: border-box;
}

.irnt-wrapper *,
.irnt-wrapper *::before,
.irnt-wrapper *::after {
    box-sizing: border-box;
}


/* =========================================================
   HEADER
   ========================================================= */

.irnt-header {
    text-align: center;
    margin-bottom: 18px;
}

.irnt-header h2 {
    margin: 0;

    font-size: 28px;
    line-height: 1.2;
    font-weight: 800;

    letter-spacing: -0.7px;
}

.irnt-header p {
    margin: 7px 0 0;

    font-size: 14px;
    line-height: 1.5;

    color: var(--irnt-muted);
}


/* =========================================================
   MAIN CARD
   ========================================================= */

.irnt-card {
    width: 100%;

    background: #ffffff;

    border: 1px solid var(--irnt-border);
    border-radius: 18px;

    padding: 12px;

    box-shadow:
        0 8px 28px rgba(16, 24, 40, 0.06);
}


/* =========================================================
   UPLOAD AREA
   ========================================================= */

.irnt-upload-area {
    position: relative;

    min-height: 220px;

    border: 1.5px dashed #cbd5e1;
    border-radius: 15px;

    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #fafcff 100%
        );

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    text-align: center;

    cursor: pointer;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.irnt-upload-area:hover {
    border-color: var(--irnt-blue);

    background: #f8fbff;

    box-shadow:
        0 6px 20px rgba(37, 99, 235, 0.06);
}

.irnt-upload-area.irnt-dragging {
    border-color: var(--irnt-blue);
    background: var(--irnt-blue-light);
}


/* =========================================================
   UPLOAD ICON
   ========================================================= */

.irnt-upload-icon {
    width: 52px;
    height: 52px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 15px;

    background: #eef4ff;
    color: var(--irnt-blue);

    margin-bottom: 12px;
}

.irnt-upload-icon svg {
    width: 26px;
    height: 26px;
}


/* =========================================================
   UPLOAD TEXT
   ========================================================= */

.irnt-upload-title {
    margin: 0;

    font-size: 17px;
    line-height: 1.4;

    font-weight: 750;
}

.irnt-upload-subtitle {
    margin-top: 5px;

    font-size: 13px;

    color: var(--irnt-muted);
}

.irnt-upload-subtitle span {
    color: var(--irnt-blue);
    font-weight: 750;
}

.irnt-upload-formats {
    margin-top: 10px;

    font-size: 10px;

    color: #98a2b3;

    font-weight: 650;

    letter-spacing: 0.04em;
}


/* =========================================================
   ORIGINAL SIZE
   Hidden because original size is shown
   inside the uploaded-image row.
   ========================================================= */

.irnt-original-info {
    display: none !important;
}


/* =========================================================
   IMAGE PREVIEW
   ========================================================= */

.irnt-preview-wrapper {
    display: none;

    width: 100%;

    margin-top: 10px;

    padding: 9px;

    border: 1px solid var(--irnt-border);
    border-radius: 13px;

    background: var(--irnt-light);
}

.irnt-preview-wrapper.irnt-show {
    display: flex;

    align-items: center;

    gap: 10px;
}


/* Image */
.irnt-preview-image {
    width: 58px;
    height: 58px;

    min-width: 58px;

    flex-shrink: 0;

    object-fit: contain;

    border-radius: 10px;

    border: 1px solid var(--irnt-border);

    background: #ffffff;
}


/* Details */
.irnt-preview-details {
    flex: 1;

    min-width: 0;
}

.irnt-preview-name {
    font-size: 14px;

    font-weight: 750;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.irnt-preview-size {
    margin-top: 3px;

    font-size: 12px;

    color: var(--irnt-muted);
}


/* Change button */
.irnt-change-button {
    flex-shrink: 0;

    border: 1px solid var(--irnt-border);

    background: #ffffff;

    color: #344054;

    border-radius: 9px;

    padding: 8px 13px;

    font-size: 12px;

    font-weight: 750;

    cursor: pointer;
}

.irnt-change-button:hover {
    background: #f9fafb;
}


/* =========================================================
   SETTINGS
   ========================================================= */

.irnt-settings {
    display: none;

    margin-top: 10px;

    padding: 14px;

    border: 1px solid var(--irnt-border);

    border-radius: 15px;

    background: #ffffff;
}

.irnt-settings.irnt-show {
    display: block;
}


/* Section title */
.irnt-section-title {
    margin: 0 0 10px;

    font-size: 16px;

    font-weight: 800;
}


/* =========================================================
   KB GRID
   ========================================================= */

.irnt-kb-grid {
    display: grid;

    grid-template-columns:
        repeat(8, minmax(0, 1fr));

    gap: 6px;
}

.irnt-kb-button {
    width: 100%;

    min-height: 40px;

    padding: 5px 3px;

    border: 1px solid var(--irnt-border);

    border-radius: 9px;

    background: #ffffff;

    color: #344054;

    font-size: 12px;

    font-weight: 750;

    cursor: pointer;

    transition:
        border-color 0.15s ease,
        background 0.15s ease,
        color 0.15s ease;
}

.irnt-kb-button:hover {
    border-color: #98a2b3;
}

.irnt-kb-button.irnt-active {
    background: var(--irnt-primary);

    border-color: var(--irnt-primary);

    color: #ffffff;
}

.irnt-kb-button.irnt-important {
    background: var(--irnt-blue-light);

    border-color: #93c5fd;

    color: #1d4ed8;
}

.irnt-kb-button.irnt-important.irnt-active {
    background: var(--irnt-primary);

    border-color: var(--irnt-primary);

    color: #ffffff;
}


/* =========================================================
   MANUAL KB
   ========================================================= */

.irnt-manual-box {
    margin-top: 10px;

    display: grid;

    grid-template-columns:
        1fr 130px auto;

    align-items: center;

    gap: 8px;

    padding: 9px 10px;

    border: 1px solid var(--irnt-border);

    border-radius: 12px;

    background: #fafafa;
}

.irnt-manual-content {
    min-width: 0;
}

.irnt-manual-title {
    font-size: 13px;

    font-weight: 750;
}

.irnt-manual-description {
    margin-top: 2px;

    font-size: 10px;

    color: var(--irnt-muted);
}


/* Input */
.irnt-manual-input-wrapper {
    position: relative;

    width: 130px;
}

.irnt-manual-input {
    width: 100%;

    height: 40px;

    padding:
        0 35px 0 10px;

    border: 1px solid #d0d5dd;

    border-radius: 9px;

    background: #ffffff;

    color: var(--irnt-text);

    font-size: 13px;

    outline: none;
}

.irnt-manual-input:focus {
    border-color: var(--irnt-blue);

    box-shadow:
        0 0 0 3px
        rgba(37, 99, 235, 0.08);
}

.irnt-manual-unit {
    position: absolute;

    right: 10px;

    top: 11px;

    font-size: 10px;

    font-weight: 750;

    color: #98a2b3;
}


/* Set */
.irnt-set-button {
    height: 40px;

    padding: 0 14px;

    border: 0;

    border-radius: 9px;

    background: #e9eef5;

    color: #344054;

    font-size: 12px;

    font-weight: 750;

    cursor: pointer;
}

.irnt-set-button:hover {
    background: #dde4ed;
}


/* =========================================================
   SELECTED TARGET
   ========================================================= */

.irnt-selected-target {
    display: none;

    margin-top: 8px;

    padding: 7px 10px;

    border: 1px solid #bbf7d0;

    border-radius: 9px;

    background: #f0fdf4;

    color: #166534;

    font-size: 11px;

    font-weight: 600;
}

.irnt-selected-target.irnt-show {
    display: block;
}

.irnt-selected-target strong {
    font-weight: 850;
}


/* =========================================================
   RESIZE BUTTON
   ========================================================= */

.irnt-resize-button {
    width: 100%;

    height: 46px;

    margin-top: 10px;

    border: 0;

    border-radius: 10px;

    background: var(--irnt-primary);

    color: #ffffff;

    font-size: 14px;

    font-weight: 800;

    cursor: pointer;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 8px;
}

.irnt-resize-button:hover:not(:disabled) {
    background: var(--irnt-primary-hover);
}

.irnt-resize-button:disabled {
    opacity: 0.45;

    cursor: not-allowed;
}


/* =========================================================
   SPINNER
   ========================================================= */

.irnt-spinner {
    width: 17px;
    height: 17px;

    border: 2px solid
        rgba(255,255,255,0.35);

    border-top-color: #ffffff;

    border-radius: 50%;

    animation:
        irnt-spin 0.7s linear infinite;
}

@keyframes irnt-spin {
    to {
        transform: rotate(360deg);
    }
}


/* =========================================================
   PROGRESS
   ========================================================= */

.irnt-progress-wrapper {
    display: none;

    margin-top: 10px;

    text-align: center;
}

.irnt-progress-wrapper.irnt-show {
    display: block;
}

.irnt-progress-bar {
    height: 5px;

    background: #edf0f3;

    border-radius: 999px;

    overflow: hidden;
}

.irnt-progress-fill {
    width: 0;

    height: 100%;

    background: var(--irnt-blue);

    border-radius: 999px;

    transition: width 0.2s ease;
}

.irnt-progress-text {
    margin-top: 6px;

    font-size: 10px;

    color: var(--irnt-muted);
}


/* =========================================================
   ERROR
   ========================================================= */

.irnt-error {
    display: none;

    margin-top: 10px;

    padding: 9px 11px;

    border: 1px solid #fecdca;

    border-radius: 9px;

    background: #fff1f0;

    color: #b42318;

    font-size: 12px;

    line-height: 1.4;
}

.irnt-error.irnt-show {
    display: block;
}


/* =========================================================
   RESULT
   ========================================================= */

.irnt-result {
    display: none;

    margin-top: 10px;

    padding: 18px;

    border: 1px solid var(--irnt-border);

    border-radius: 15px;

    background: #ffffff;

    text-align: center;

    box-shadow:
        0 8px 25px
        rgba(16, 24, 40, 0.05);
}

.irnt-result.irnt-show {
    display: block;
}

.irnt-success-icon {
    width: 45px;
    height: 45px;

    margin: 0 auto 10px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: var(--irnt-success-bg);

    color: var(--irnt-success);

    font-size: 22px;

    font-weight: 900;
}

.irnt-result-title {
    margin: 0;

    font-size: 18px;

    font-weight: 800;
}

.irnt-result-subtitle {
    margin: 5px 0 0;

    font-size: 12px;

    color: var(--irnt-muted);
}


/* Result sizes */
.irnt-result-sizes {
    display: flex;

    align-items: center;
    justify-content: center;

    gap: 18px;

    margin: 15px 0 3px;
}

.irnt-result-size {
    min-width: 105px;
}

.irnt-result-size-label {
    display: block;

    font-size: 9px;

    font-weight: 750;

    text-transform: uppercase;

    letter-spacing: 0.08em;

    color: #98a2b3;
}

.irnt-result-size-value {
    display: block;

    margin-top: 3px;

    font-size: 15px;

    font-weight: 800;
}

.irnt-result-arrow {
    color: #98a2b3;

    font-size: 18px;
}


/* Download */
.irnt-download-button {
    width: 100%;

    height: 46px;

    margin-top: 12px;

    border: 0;

    border-radius: 10px;

    background: var(--irnt-primary);

    color: #ffffff;

    font-size: 14px;

    font-weight: 800;

    cursor: pointer;
}

.irnt-download-button:hover {
    background: var(--irnt-primary-hover);
}

.irnt-download-icon {
    font-size: 17px;
}


/* Another image */
.irnt-another-button {
    margin-top: 9px;

    border: 0;

    background: transparent;

    color: var(--irnt-blue);

    font-size: 12px;

    font-weight: 750;

    cursor: pointer;
}

.irnt-another-button:hover {
    text-decoration: underline;
}


/* =========================================================
   HIDDEN
   ========================================================= */

.irnt-hidden {
    display: none !important;
}


/* =========================================================
   LAPTOP / DESKTOP
   ========================================================= */

@media (min-width: 769px) {

    .irnt-wrapper {
        max-width: 680px;
    }

    .irnt-card {
        padding: 12px;
    }

    .irnt-upload-area {
        min-height: 220px;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {

    .irnt-wrapper {
        max-width: 100%;

        margin: 18px auto;

        padding:
            0 8px 25px;
    }

    .irnt-header {
        margin-bottom: 15px;
    }

    .irnt-header h2 {
        font-size: 24px;
    }

    .irnt-header p {
        font-size: 13px;
    }

    .irnt-card {
        padding: 9px;

        border-radius: 16px;
    }

    .irnt-upload-area {
        min-height: 210px;

        border-radius: 14px;
    }

    .irnt-upload-icon {
        width: 50px;
        height: 50px;
    }

    .irnt-upload-title {
        font-size: 16px;
    }


    /* Preview */
    .irnt-preview-wrapper.irnt-show {
        gap: 8px;

        padding: 8px;
    }

    .irnt-preview-image {
        width: 55px;
        height: 55px;

        min-width: 55px;
    }

    .irnt-preview-name {
        font-size: 13px;
    }

    .irnt-preview-size {
        font-size: 11px;
    }

    .irnt-change-button {
        padding:
            7px 10px;

        font-size: 11px;
    }


    /* KB buttons */
    .irnt-kb-grid {
        grid-template-columns:
            repeat(4, 1fr);

        gap: 6px;
    }

    .irnt-kb-button {
        min-height: 40px;

        font-size: 12px;
    }


    /* Manual */
    .irnt-manual-box {
        grid-template-columns:
            1fr 115px auto;

        gap: 6px;

        padding: 8px;
    }

    .irnt-manual-input-wrapper {
        width: 115px;
    }

    .irnt-manual-input {
        height: 40px;
    }

    .irnt-set-button {
        height: 40px;

        padding: 0 11px;
    }


    /* Result */
    .irnt-result {
        padding: 17px 12px;
    }

    .irnt-result-sizes {
        gap: 8px;
    }

    .irnt-result-size {
        min-width: 90px;
    }
}


/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 380px) {

    .irnt-manual-box {
        grid-template-columns: 1fr;
    }

    .irnt-manual-input-wrapper {
        width: 100%;
    }

    .irnt-set-button {
        width: 100%;
    }
}






















/* =========================================================
   IMAGE RESIZER - COMPACT DESKTOP / LAPTOP
   ========================================================= */

.irnt-wrapper {
    width: 100% !important;
    max-width: 680px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
}


/* Main card */
.irnt-wrapper .irnt-card {
    width: 100% !important;
    max-width: 680px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}


/* Upload box */
.irnt-wrapper .irnt-upload-area {
    width: 100% !important;
    min-height: 230px !important;
    max-height: 230px !important;
}


/* =========================================================
   LAPTOP
   ========================================================= */

@media (min-width: 769px) and (max-width: 1366px) {

    .irnt-wrapper {
        max-width: 650px !important;
    }

    .irnt-wrapper .irnt-card {
        max-width: 650px !important;
    }

    .irnt-wrapper .irnt-upload-area {
        min-height: 220px !important;
        max-height: 220px !important;
    }
}


/* =========================================================
   PC / LARGE DESKTOP
   ========================================================= */

@media (min-width: 1367px) {

    .irnt-wrapper {
        max-width: 680px !important;
    }

    .irnt-wrapper .irnt-card {
        max-width: 680px !important;
    }

    .irnt-wrapper .irnt-upload-area {
        min-height: 230px !important;
        max-height: 230px !important;
    }
}


/* =========================================================
   MOBILE - FULL WIDTH
   ========================================================= */

@media (max-width: 768px) {

    .irnt-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 11px !important;
        padding-right: 11px !important;
    }

    .irnt-wrapper .irnt-card {
        max-width: 100% !important;
    }

    .irnt-wrapper .irnt-upload-area {
        min-height: 220px !important;
        max-height: none !important;
    }
}