.elementor-5527 .elementor-element.elementor-element-f27caf9{--display:flex;--margin-top:100px;--margin-bottom:0px;--margin-left:0px;--margin-right:0px;}.elementor-5527 .elementor-element.elementor-element-db677a4{text-align:center;}.elementor-5527 .elementor-element.elementor-element-40f5953{margin:50px 50px calc(var(--kit-widget-spacing, 0px) + 50px) 50px;}.elementor-5527 .elementor-element.elementor-element-40f5953.elementor-element{--align-self:center;}.elementor-5527 .elementor-element.elementor-element-ff9ab1e{--display:flex;}/* Start custom CSS for html, class: .elementor-element-40f5953 */.percent-calculator {
    background-color: #fff;
    padding: 25px 30px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 70, 110, 0.08);
    width: 100%;
    max-width: 550px;
    margin: 20px;
    box-sizing: border-box;
}

.percent-calculator fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

.cform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 15px 20px;
    margin-bottom: 25px;
}

.cform-field {
    display: flex;
    flex-direction: column;
}

.cform-field label {
    font-size: 0.9rem;
    color: #556068;
    margin-bottom: 6px;
    font-weight: 500;
}

.cform-input {
    padding: 10px 12px;
    border: 1px solid #d1d9e0;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.cform-input:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.15);
    outline: none;
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type=number] {
  -moz-appearance: textfield;
}

.cform-field .caption {
    font-size: 0.8rem;
    color: #77828a;
    margin-top: 4px;
}

.cform-row {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.cform-row input[type="radio"] {
    margin-right: 8px;
    accent-color: #4a90e2;
    width: 1.1em;
    height: 1.1em;
    flex-shrink: 0;
}

.cform-row label {
    font-size: 1rem;
    color: #333b42;
    cursor: pointer;
}

.cform-row.flex-right {
    justify-content: flex-end;
    margin-top: 25px;
}

.cform-row input[type="button"] {
    padding: 10px 25px;
    font-size: 1rem;
    font-weight: 500;
    color: #fff;
    background-color: #e64a5f;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.cform-row input[type="button"]:hover {
    background-color: #d63a4f;
}

.result-area {
     margin-top: 20px;
     padding: 15px;
     border: 1px solid #d1d9e0;
     border-radius: 5px;
     background-color: #f8f9fa;
     min-height: 50px;
     display: flex; /* Use flexbox for inner alignment */
     align-items: flex-start; /* Align items to the top */
     justify-content: space-between; /* Space between description and value */
     text-align: left; /* Align text within description to the left */
     flex-wrap: wrap; /* Allow items to wrap if container is too narrow */
     color: #333b42;
     word-wrap: break-word;
     overflow-wrap: break-word;
}

/* Styles for the text part of the result (needs to be wrapped in an element by JS) */
.result-area .result-description {
    flex-grow: 1; /* Allow text to take available space */
    margin-right: 10px; /* Space between text and number */
    /* No specific text-align needed as container is left-aligned */
}

/* Styles for the numerical value part of the result (needs to be wrapped by JS) */
.result-area .result-value {
    flex-shrink: 0; /* Prevent value from shrinking */
    text-align: right; /* Align the number itself to the right */
    white-space: nowrap; /* Keep the number on one line if possible */
}

/* Styling for emphasized text within the result area */
.result-area .result-value strong {
    font-size: 1.3rem;
    color: #4a90e2;
    font-weight: 700;
}

/* Styling for error messages in the result area */
/* Override flex layout for errors to center text */
.result-area.error {
    color: #d63a4f;
    font-weight: 500;
    border-color: #f5c6cb;
    background-color: #f8d7da;
    font-size: 1rem;
    display: block; /* Revert to block layout */
    text-align: center; /* Center the error text */
    justify-content: center; /* Ensure center alignment if display:flex somehow persists */
    align-items: center;
    padding: 15px; /* Ensure consistent padding */
}
/* Hide inner elements when in error state */
.result-area.error .result-description,
.result-area.error .result-value {
    display: none;
}


#number2-alt-wrapper {
    display: none;
}

@media (max-width: 768px) {
    .percent-calculator {
        padding: 20px 25px;
    }
}

@media (max-width: 550px) {
    .percent-calculator {
        padding: 15px 20px;
        margin: 10px;
    }

    .cform-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .cform-row label {
         line-height: 1.4;
    }

    .cform-row.flex-right {
        justify-content: center;
    }
}

@media (max-width: 400px) {
     .percent-calculator {
         padding: 15px;
         margin: 5px;
     }

     .cform-field label,
     .cform-row label {
         font-size: 0.95rem;
     }

     .cform-input {
         font-size: 0.95rem;
     }

     .result-area {
         font-size: 1rem;
         padding: 12px;
     }

     .result-area .result-value strong {
         font-size: 1.2rem;
     }

     .cform-row input[type="button"] {
         font-size: 0.95rem;
         padding: 10px 20px;
     }
}/* End custom CSS */