/* Styles for the commitments section */

/*id: commitments-main-container must have three columns */
#commitments-main-container {
    display: grid;
    grid-template-columns: 30% 40% 30%;
    grid-gap: 1rem;
}

/* class: commitments-container must have 5 rows*/
.commitments-container {
    display: grid;
    margin: 10px 0px 40px 0px;
    grid-template-rows: 80px 30px auto 50px 50px; /* auto row for flexible content*/
    text-align: center;
    /* add border */
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 1rem;
    background-color: #f2f2f2;
    box-shadow: 10px 10px 10px rgba(0, 0, 0, 0.1); /* Softer shadow */
}

.commitments-container-placeholder {
    display: grid;
    margin: 10px 0px 40px 0px;
    grid-template-rows: 70px 100px;
    text-align: center;
    /* add border */
    border: 2px dashed #216d1f;
    border-radius: 10px;
    padding: 1rem;
    background-color: #f2f2f2;
    box-shadow: 10px 10px 10px rgba(0, 0, 0, 0.1); /* Softer shadow */
}

/* id: require-spent-container must have 2 columns*/
#require-spent-container {
    display: flex; /* Use flexbox for easier arrangement */
    justify-content: space-around; /* Distribute items nicely */
    align-items: center; /* Vertically center elements */
    margin-bottom: 10px; /* Space between rows */
}

/* Reset margin on commitments-header */
#commitments-header {
    margin-bottom: 10px; /* Spacing below header */
}

#requiredSpentLabel {
    margin: 20px 0px 0px 0px;
}

#requiredAmount, #spentAmount {
    margin: 0;
}

/* Progress bar styling */
#myProgress {
    width: 100%;
    background-color: #ddd;
    border-radius: 5px; /* Rounded corners */
}
  
.myBar {
    width: 0%; /* Matches the value in the HTML */
    height: 30px; /* Reduced height for a sleeker look */
    background-color: #04AA6D;
    text-align: center;
    line-height: 30px; 
    color: white;
    border-radius: 5px;
}
  
#days-left-header {
    margin-bottom: 5px; /* Reduce spacing */
}
  
.click-to-expand {
    cursor: pointer; /* Indicate that it's clickable */
    color: #007bff;  /* Standard link color */
    border-bottom: 1px dashed #007bff;  /* Dashed underline */
}

#commitments-expand-container {
    /* display: none; Hide by default */
    display: grid;
    grid-template-rows: 50px auto auto auto auto auto; /* auto row for flexible content*/
    text-align: center;
    background-color: #f2f2f2;
}

/* commitments expand container hide by default */
#commitments-expand-container {
    display: none;
}

#commitments-expand-header-text {
    margin-bottom: 10px; /* Spacing below header */
}

#require-spent-expand-container {
    display: flex; /* Use flexbox for easier arrangement */
    justify-content: space-around; /* Distribute items nicely */
    align-items: center; /* Vertically center elements */
    margin-bottom: 10px; /* Space between rows */
}

#requiredSpentExpandLabel {
    margin: 20px 0px 0px 0px;
}

#requiredExpandAmount, #spentExpandAmount {
    margin: 0;
}

#myProgressExpand {
    width: 100%;
    background-color: #ddd;
    border-radius: 5px; /* Rounded corners */
    margin-bottom: 20px;
}

#circle-button-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

#circle-button {
    width: 50px;      /* Adjust the size as desired */
    height: 50px;     /* Must be equal to the width for a perfect circle */
    border-radius: 50%; /* Creates the circle shape */
    background-color: #04AA6D; /* Your desired button color */
    color: white;         /* Color of the plus sign */
    display: flex;
    justify-content: center;  /* Centers the plus sign horizontally */
    align-items: center;      /* Centers the plus sign vertically */
    cursor: pointer;          /* Indicate it's clickable */
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2); /* Adds a subtle shadow */
}

#circle-button:hover {
background-color: #038853; /* Example of a hover effect - darker shade */
}

.sub-container {
    margin: 10px 0px 10px 0px;  
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 10px 10px 10px rgba(0, 0, 0, 0.1); /* Softer shadow */
}


/* Add this to your existing styles or create a new stylesheet */
#payment-allocation-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black overlay */
    z-index: 999; /* Place it below the modal */
}

#payment-allocation-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    padding: 20px;
    border: 1px solid #ccc;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

#payment-allocation-modal.show,
#payment-allocation-modal-overlay.show {
    display: block;
}

#form-footer {
    text-align: center;
}