@charset "utf-8";
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@200;400;600;700&display=swap');

/* Apply base styles from target CSS */
body {
    background-color: #fff;
    color: #232323;
    font-weight: 400;
    font-family: 'Raleway', sans-serif;
    font-size: 18px; /* Target body font size */
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    padding: 20px; /* Keep some padding for standalone view */
}

/* Custom Alert Modal */
#custom-alert {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    border: 1px solid #ccc;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    font-size: 1.5em; /* Increased font size */
}

#custom-alert p {
    font-size: 1.2em; /* Increased paragraph font size */
}

#custom-alert button {
    padding: 10px 20px; /* Larger button */
    background-color: #9b1156;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Raleway', sans-serif;
    font-weight: 400;
    line-height: 1.2;
    margin: 0 0 20px;
}

h1 {
    font-size: 34px; /* Target h1 size */
    font-weight: bold; /* Target h1 weight */
    color: #9b1156; /* Target h1 color */
    text-align: center;
    margin-bottom: 30px;
}

p {
    font-size: 18px; /* Target p size */
    color: #232323; /* Target p color */
    margin: 0 0 15px;
    padding: 0;
}

/* Container for the tool */
.sizing-tool-container {
    max-width: 550px;
    margin: 20px auto;
    padding: 30px;
    background-color: #fff; /* Keep white background */
    border: 1px solid #ddd; /* Add subtle border like inputs */
    border-radius: 5px; /* Match input radius */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05); /* Softer shadow */
}

.input-group {
    margin-bottom: 20px; /* Consistent margin */
}

/* Labels and instructional text */
.input-group p,
.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600; /* Use heavier weight for labels */
    color: #232323; /* Standard text color for labels */
    font-size: 16px; /* Slightly smaller for labels */
}

/* Style inputs and selects according to target */
input[type="number"],
select {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: none;
    color: #000;
    font-size: 16px; /* Target input font size */
    font-weight: 400; /* Target input font weight */
    padding: 8px 15px; /* Adjusted padding for better height */
    width: 100%;
    box-sizing: border-box; /* Crucial for width calculation */
    height: 40px; /* Consistent height */
}

/* Remove spinners from number input */
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; /* Firefox */
}

/* Input field container with unit display */
.input-with-unit {
    display: flex;
    align-items: center;
    border: 1px solid #ddd; /* Match target input border */
    border-radius: 5px; /* Match target input radius */
    background-color: #fff; /* Ensure background consistency */
}

.input-with-unit input[type="number"] {
    flex-grow: 1;
    border: none; /* Remove inner border */
    border-radius: 5px 0 0 5px; /* Adjust radius */
    outline: none;
    height: auto; /* Let container control height */
    padding: 8px 15px; /* Match target input padding */
}

.input-with-unit span {
    padding: 0 10px;
    color: #999; /* Subtler color for unit */
    border-left: 1px solid #ddd;
    font-size: 14px;
    line-height: 40px; /* Align vertically within container */
    height: 40px;
}

/* Select specific styling */
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    /* Basic arrow using CSS */
    background-image: linear-gradient(45deg, transparent 50%, #9b1156 50%), linear-gradient(135deg, #9b1156 50%, transparent 50%);
    background-position: calc(100% - 20px) center, calc(100% - 15px) center;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 40px; /* Make space for arrow */
}


/* Button group styling */
.button-group {
    display: flex;
    gap: 10px; /* Space between buttons */
}

.button-group button {
    padding: 8px 15px; /* Match input padding */
    border: 1px solid #9b1156; /* Use primary color for border */
    background-color: white;
    color: #9b1156; /* Use primary color for text */
    border-radius: 5px; /* Match input radius */
    cursor: pointer;
    font-size: 16px; /* Match input font size */
    font-weight: 600; /* Make choice buttons slightly bolder */
    transition: background-color 0.2s, color 0.2s;
    flex-grow: 1; /* Make buttons fill space if needed */
    text-align: center;
}
.button-group button:last-child {
    margin-right: 0;
}

.button-group button.active {
    background-color: #9b1156; /* Primary color background */
    color: white; /* White text */
    border-color: #9b1156; /* Ensure border matches */
}

/* Action buttons (Calculate, Shop Now) */
#calculate-button {
    border-radius: 15px; /* Target button radius */
    padding: 8px 15px; /* Consistent padding */
    background-color: #9B1156; /* Target button background */
    color: #FFFFFF; /* Target button text color */
    font-size: 18px; /* Slightly smaller than target's 22px for better fit */
    font-weight: bold; /* Target button weight */
    text-decoration: none;
    box-shadow: 0px 2px 2px rgba(100, 100, 100, 0.5); /* Target shadow, slightly less opaque */
    border: 1px solid #9B1156; /* Add border for hover effect */
    width: 100%;
    margin-top: 15px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}

#calculate-button:hover {
    background-color: #FFFFFF;
    color: #9B1156;
    box-shadow: 0px 1px 1px rgba(100, 100, 100, 0.3);
}

/* Result display */
.result-div {
    margin-top: 30px;
    padding: 20px;
    background-color: #fae8f0; /* Light pink from target's table style */
    border: 1px solid #ddd;
    border-radius: 5px;
    text-align: center;
    color: #232323; /* Standard text color */
}

.result-div p {
    margin: 0;
    font-size: 18px;
    line-height: 1.4;
}

.result-div strong {
    font-size: 22px; /* Keep size large for emphasis */
    font-weight: 600; /* Match h3 weight */
    display: block;
    margin-top: 5px;
    color: #9b1156; /* Highlight size with primary color */
}


/* Error display */
.error-div {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8d7da; /* Standard light red */
    color: #721c24; /* Standard dark red */
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    text-align: center;
}
.error-div p {
    margin: 0;
    font-size: 16px;
}

/* Utility */
.hidden {
    display: none;
}
