/* Reset WordPress theme constraints for pages and posts */
.entry-content, .wp-block-post-content, .post-content, .content-area, .site-content, .page-content, .wp-block-column, .npm-calculator {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 10px !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}

.npm-calculator {
    background: #ffffff;
    padding: 12px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    width: calc(100% - 24px) !important;
    max-width: 560px;
    margin: 10px auto;
}

h1 {
    font-size: 18px;
    color: #222;
    text-align: center;
    margin: 0 0 10px;
    line-height: 1.3;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.npm-form-group {
    margin-bottom: 8px;
}

label {
    display: block;
    font-size: 12px;
    color: #333;
    font-weight: 600;
    margin-bottom: 3px;
}

input, select {
    width: 100%;
    padding: 6px;
    border: 1px solid #d5d5d5;
    border-radius: 4px;
    font-size: 12px;
    box-sizing: border-box;
    font-family: inherit;
}

input:focus, select:focus {
    outline: none;
    border-color: #0055aa;
    box-shadow: 0 0 3px rgba(0, 85, 170, 0.2);
}

.npm-button-group {
    display: flex;
    gap: 5px;
    margin: 10px 0;
    flex-wrap: wrap;
    justify-content: center;
}

button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
    flex: 1;
    min-width: 70px;
}

#calculateBtn {
    background-color: #0055aa;
    color: #fff;
}

#calculateBtn:hover {
    background-color: #003d80;
}

#resetBtn {
    background-color: #b30000;
    color: #fff;
}

#resetBtn:hover {
    background-color: #8b0000;
}

#downloadBtn {
    background-color: #00802b;
    color: #fff;
}

#downloadBtn:disabled {
    background-color: #aaaaaa;
    cursor: not-allowed;
}

#downloadBtn:hover:not(:disabled) {
    background-color: #006622;
}

.npm-result {
    margin-top: 10px;
    padding: 8px;
    border-radius: 4px;
    background-color: #f2f2f2;
    color: #222;
    font-size: 12px;
    text-align: center;
    overflow-wrap: break-word;
}

/* Responsiveness for WordPress pages/posts and mobile */
@media (max-width: 768px) {
    .npm-calculator {
        padding: 8px !important;
        width: calc(100% - 16px) !important;
        max-width: 100% !important;
    }

    h1 {
        font-size: 16px;
    }

    label, input, select, button {
        font-size: 11px;
    }

    button {
        padding: 5px;
        min-width: 60px;
    }
}

@media (max-width: 480px) {
    .npm-calculator {
        padding: 6px !important;
        width: calc(100% - 12px) !important;
    }

    h1 {
        font-size: 14px;
        margin-bottom: 6px;
    }

    .npm-form-group {
        margin-bottom: 6px;
    }

    label {
        font-size: 10px;
    }

    input, select {
        padding: 5px;
        font-size: 10px;
    }

    .npm-button-group {
        flex-direction: column;
        gap: 4px;
    }

    button {
        width: 100%;
        padding: 6px;
        font-size: 10px;
    }

    .npm-result {
        font-size: 10px;
        padding: 6px;
    }
}