/* Variables */
:root {
    --primary-color: #032D60;
    --color-text: #032D60;
    --color-text2: #5867E8;
    --secondary-color: #c0c0c0;
    --color-bg: #cfcfcf;
    --color-bg2: #ECECEC;
    --font-size: 1rem;
    --border-radius: 6px;
    --provision-color: #ffcc00;
    /* Add more variables as needed */
}

/* General body styling */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: #f4f4f9;
    line-height: 1.6;
    color: var(--color-text);
}

/* Removed for Iframe
.container {
    max-width: 600px;
    margin: 40px auto;
}*/

.settings-container {
    background: #ECECEC;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #ccc;
    display: flex;
    flex-direction: column;
}
.settings-container label span {
    text-align: left;
    margin-top: 8px;
}

.results-container {
    margin-top: 20px;
    background: #ECECEC;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #ccc;
    text-align: center;
    position: relative;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: none;
}

.top-spacer {
    position: absolute;
    inset: 0;
    top: 0;
    height: 0.5rem;
    border-radius: 50px 50px 0 0;
    width: 100%;
    background: linear-gradient(90deg, rgb(2, 190, 199) -12.85%, rgb(30, 29, 128) 26.7%, rgb(123, 0, 225) 95.81%, rgb(220, 50, 236) 129.59%);
}

/* Input styling */
input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid var(--primary-color);
    background-color: #f8f9fa;
    border-radius: 6px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus {
    border-color: #007BFF;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
    outline: none;
}

select {
    background-color: #f8f9fa;
    color: var(--color-text);
}

/* Button styles */
button {
    padding: 12px 20px;
    margin: 20px auto;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    background-color: #c0c0c0;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

button:hover {
    transform: scale(1.05);
}

button.primary {
    background-color: #a42685;
    color: white;
}

button.primary:hover {
    background-color: #d50b80;
}

button.secondary {
    background-color: #f8f9fa;
    border: 1px solid var(--color-text);
}

button.secondary:hover {
    background-color: #e2e6ea;
}

.heading {
    font-weight: bold;
    border-bottom: 1px solid #b4b4b4;
}

/* Results section */
.results {
    margin-top: 30px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: none;
}

/* Row Wrapper Styling */
.row-wrapper {
    display: flex;
    flex-direction: column; /* Stack rows vertically */
    gap: 20px; /* Space between rows */
    padding: 20px;
    border-radius: 8px;
}

/* Individual Row Styling */
.row {
    background-color: var(--color-bg2);
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: background-color 0.3s ease, transform 0.3s ease;
}

/* Hover Effect for Rows */
.row:hover {
    background-color: var(--color-bg); /* Slightly lighter grey on hover */
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Row Heading */
.row h2 {
    font-size: 1.6rem;
    color: var(--color-text);
    margin-bottom: 10px;
    border-bottom: 1px solid var(--color-text);
    padding-bottom: 5px;
}

/* Row Paragraph */
.row p {
    font-size: 1.1rem;
    margin: 8px 0;
    line-height: 1.6;
}

/* Bold Text within Paragraphs */
.row p strong {
    font-weight: bold;
}

/* Large Provision Styling */
.provision-large {
    font-weight: bold;
    font-size: 3rem;
    /*color: #ffcc00;*/
    background: linear-gradient(90deg, rgb(2, 190, 199) -12.85%, rgb(30, 29, 128) 26.7%, rgb(123, 0, 225) 95.81%, rgb(220, 50, 236) 129.59%) text;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke-color: rgb(142, 85, 228);
    accent-color: rgb(142, 85, 228);
}

/* Responsive Design for Smaller Screens */
@media (max-width: 768px) {
    .row-wrapper {
        padding: 15px;
        gap: 15px;
    }

    .results-container {
        padding: 0px;
        margin-top: 10px;
    }

    .row {
        padding: 15px;
    }

    .row h2 {
        font-size: 1.4rem;
    }

    .row p {
        font-size: 1rem;
    }

    .provision-large {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .row-wrapper {
        padding: 10px;
        gap: 10px;
    }

    .row {
        padding: 10px;
    }

    .row h2 {
        font-size: 1.2rem;
    }

    .row p {
        font-size: 0.9rem;
    }

    .provision-large {
        font-size: 2rem;
    }
}

h2 {
    font-size: 1.5rem;
}

p {
    font-size: 1.1rem;
    margin: 5px 0;
}

p strong {
    font-weight: bold;
}

span {
    color: var(--color-text);
}

.bold {
    font-weight: bold;
}

.border-bottom {
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

canvas {
    margin: 20px auto;
    display: block;
    width: 100%;
    max-width: 800px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

/* Tooltip container */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: pointer;
    color: #007BFF;
    font-size: 0.9rem;
}

/* Tooltip text */
.tooltip .tooltiptext {
    visibility: hidden;
    width: 220px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 10px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -110px;
    opacity: 0;
    transition: opacity 0.3s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Tooltip arrow */
.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -14px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

/* Show the tooltip text when you mouse over the tooltip container */
.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Adjust SVG size */
.tooltip img {
    width: 16px;
    height: 16px;
}

/* Advanced tab */
#toggle-advanced {
    padding: 6px 12px;
    margin: 10px auto;
    font-size: 0.8rem;
    border-radius: 4px;
}

.advanced-tab {
    padding-left: 15px;
    padding-right: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    text-align: center;
}

.base-product {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    margin: 10px 0;
}

.base-product label {
    font-size: 1rem;
    position: relative;
}

.base-product input {
    width: 100px;
    padding: 12px;
    margin: 0;
    border-radius: 6px;
    text-align: center;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.additional-members {
    margin-top: 20px;
    font-size: 1rem;
}

.hidden {
    display: none;
}

.month-pair-title {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 10px;
    max-height: 42px;
}

.month-pair {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    max-height: 56px;
}

.month-pair input {
    flex: 1;
    padding: 10px;
}

/* Remove Button Styling */
.remove-month {
    background-color: #e74c3c;
    color: #fff;
    cursor: pointer;
    font-weight: bold;
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.remove-month svg {
    width: 1.2em;
    height: 1.2em;
    fill: currentColor;
    transition: transform 0.2s ease;
}

.remove-month:hover {
    background-color: #c0392b;
    transform: scale(1.05);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.remove-month:hover svg {
    transform: rotate(-10deg);
}

.remove-month:active {
    background-color: #a93226;
    transform: scale(1);
}

/* Selectors Wrapper Styling */
.selectors-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-start; 
}

.logo {
    width: 128px;
    height: auto;
}

.language-selector {
    margin-left: auto;
}

/* Adjust Language Selector */
.language-selector select {
    padding: 8px 10px;
    border: 1px solid var(--color-text);
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Adjust Currency Selector */
.currency-selector select {
    padding: 8px 10px;
    border: 1px solid var(--color-text);
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Hover and Focus States */
.selectors-wrapper select:hover {
    border-color: #888;
}

.selectors-wrapper select:focus {
    border-color: #555;
    box-shadow: 0 0 5px rgba(85, 85, 85, 0.5);
    outline: none;
}

@media (max-width: 600px) {
    .selectors-wrapper {
        flex-direction: column;
        align-items: flex-end;
    }

    .language-selector,
    .currency-selector {
        width: 100%;
    }

    .language-selector select,
    .currency-selector select {
        width: 100%;
    }

    .results {
        padding: 4px;
        margin-top: 0px;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 0px;
    }
    .settings-container {
        padding: 16px;
    }

    input, button {
        font-size: 0.8rem!important;
    }

    label {
        font-size: 0.9rem;
    }

    h1, h2 {
        font-size: 1rem!important;
    }

    p, span {
        font-size: 0.9rem;
        font-weight: bold;
    }

    .base-product {
        flex-direction: column;
        align-items: flex-start;
    }

    .base-product label {
        flex: none;
        width: auto;
        margin-bottom: 5px;
    }

    .base-product input {
        width: 100%;
        text-align: center;
    }
}

/* Disclaimer Styling */
.disclaimer {
    text-align: left;
    padding: 20px;
    background-color: #f9f9f9;
    border-top: 1px solid #e0e0e0;
    margin-top: 40px;
    border-radius: 10px;
}

.disclaimer p {
    font-size: 12px!important;
    color: #666!important;
    margin: 0;
    margin-left: auto;
    margin-right: auto;
    line-height: 1;
}

/* Responsive Adjustments */
@media (max-width: 600px) {
    .disclaimer {
        padding: 15px;
        font-size: 8px;
        margin-top: 8px;
    }
}