#shutter-calculator {
    font-family: 'Montserrat', sans-serif!important;
    font-weight: 300;
    font-style: normal;
    color: #444;
    font-size: 16px;
    line-height: 25px;
    background: linear-gradient(135deg, #f5f7fa, #c3cfe2);
    border-radius: 10px;
    padding: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

#shutter-calculator h2,h3 {
    font-family: 'Montserrat', cardo!important;
    font-weight: 700;
    font-style: normal;
    color: #2c3e50;
    font-size: 26px;
    line-height: 28px;
    text-transform: uppercase;
}

.section {
    padding: 25px 45px;
    margin-bottom: 25px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
    box-sizing: border-box;
}

#window-design{
    margin-top: 120px;
}

.section h2 {
    font-size: 24px;
    color: #34495e;
    margin-bottom: 10px;
    font-weight: 700;
    text-align: center;
}

.section p {
    text-align: center;
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 20px;
    font-style: italic;
}

.options-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

.option {
    cursor: pointer;
    padding: 30px;
    border: 1px solid #e1e1e1;
    border-radius: 15px;
    background-color: #f9f9f9;
    flex: 1 1 calc(33% - 20px);
    max-width: 30%;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: auto;
    box-sizing: border-box;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.option:hover {
    background-color: #ecf0f1;
    border-color: #bdc3c7;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.option img {
    margin: 20px;
    max-width: 200px;
    height: auto;
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}

.option:hover img {
    transform: scale(1.1);
}

.option h3 {
    font-size: 18px;
    font-weight: 600;
    color: #34495e;
    margin-top: 10px;
}

.option.selected {
    background-color: #d6eaf8;
    border-color: #2980b9;
}

.option .circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #2980b9;
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.option.selected .circle {
    background-color: #2980b9;
}

.option.selected .circle::after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: white;
}

.radio-group, .add-window {
    display: flex;
    margin: 20px;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.radio-group label, .unit-type {
    cursor: pointer;
    padding: 8px 20px;
    border-radius: 30px;
    border: 1px solid #ddd;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s;
    color: #34495e;
    background: #ecf0f1;
}

.radio-group label.selected, .unit-type.selected {
    background-color: #2980b9;
    color: #fff;
    border-color: #2980b9;
}

#measurement-inputs {
    margin-top: 20px;
    display: none;
}

.measurement-row {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    margin-bottom: 12px;
    position: relative;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
}

.measurement-row input {
    width: 25%;
    min-width: 80px;
    max-width: 200px;
    padding: 8px;
    text-align: center;
    border-radius: 8px;
    border: 1px solid #bdc3c7;
    background-color: #ecf0f1;
    color: #34495e;
    transition: all 0.3s;
    box-sizing: border-box;
}

.measurement-row input:focus {
    border-color: #2980b9;
    background-color: #fff;
    outline: none;
}

.delete-window {
    cursor: pointer;
    color: #e74c3c;
    font-weight: bold;
    margin-left: 5px;
    position: absolute;
    right: 40px;
    z-index: 5;
}

.measurement-section .add-window {
    cursor: pointer;
    font-size: 18px;
    color: #2980b9;
    transition: color 0.3s;
}

.measurement-section .add-window:hover {
    color: #3498db;
}

.fixed-footer {
    bottom: 0;
    left: 0;
    right: 0;
    background: #34495e;
    color: #fff;
    text-align: center;
    padding: 50px;
    font-size: 22px;
    font-weight: 600;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    z-index: 100;
    transition: all 0.3s ease;
}

button#resetButton, #calculate-btn button {
    background-color: #2980b9;
    color: #fff;
    padding: 12px 24px;
    border: none;
    border-radius: 30px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

button#resetButton:hover, #calculate-btn button:hover {
    background-color: #3498db;
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

button#resetButton:active, #calculate-btn button:active {
    background-color: #2980b9;
    transform: translateY(0);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Modal container */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease-out;
    padding: 20px;
    box-sizing: border-box;
}

/* Only show modal when explicitly opened */
.modal[style*="display: block"],
.modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(10px);
    }
}

/* Modal content */
.modal-content {
    background: linear-gradient(135deg, #ffffff, #f9f9f9);
    margin: 0 auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideIn 0.4s ease-out;
    transform-origin: center;
    box-sizing: border-box;
}

@keyframes slideIn {
    from {
        transform: scale(0.7) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* Close button */
.close-button {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #888;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: transparent;
    z-index: 10;
}

.close-button:hover {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
    transform: rotate(90deg);
}

/* Modal header */
.modal-content h2 {
    text-align: center;
    font-size: 22px;
    color: #34495e;
    margin-bottom: 20px;
    font-weight: 700;
}

/* Form fields */
.modal-content label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

.modal-content input {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    background-color: #f9f9f9;
    transition: border-color 0.3s;
}

.modal-content input:focus {
    border-color: #2980b9;
    outline: none;
}

.modal-content button {
    background: linear-gradient(135deg, #2980b9, #3498db);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s ease;
    width: 100%;
}

.modal-content button:hover {
    background: linear-gradient(135deg, #3498db, #5dade2);
}

.modal-content button:active {
    background: linear-gradient(135deg, #2980b9, #2471a3);
    transform: scale(0.98);
}

/* Add some style to the form */
.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Add spacing around modal content */
.modal-content .content-wrapper {
    padding: 20px;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablet (Portrait) */
@media (max-width: 992px) {
    #shutter-calculator {
        padding: 15px;
    }

    .section {
        padding: 20px 25px;
    }

    .option {
        flex: 1 1 calc(50% - 20px);
        max-width: 48%;
        padding: 20px;
    }

    .option img {
        max-width: 150px;
    }

    #window-design {
        margin-top: 80px;
    }

    .measurement-row input {
        width: 22%;
        font-size: 14px;
        padding: 6px;
    }

    .fixed-footer {
        padding: 30px 15px;
        font-size: 18px;
    }
}

/* Mobile (Landscape) */
@media (max-width: 768px) {
    #shutter-calculator {
        padding: 10px;
        border-radius: 5px;
    }

    #shutter-calculator h2, #shutter-calculator h3 {
        font-size: 20px;
        line-height: 24px;
    }

    .section {
        padding: 15px 20px;
        margin-bottom: 20px;
    }

    .section h2 {
        font-size: 20px;
        margin-bottom: 15px;
    }

    .section p {
        font-size: 13px;
    }

    .options-container {
        gap: 15px;
    }

    .option {
        flex: 1 1 100%;
        max-width: 100%;
        padding: 20px 15px;
        margin-bottom: 10px;
    }

    .option img {
        max-width: 180px;
        margin: 10px;
    }

    .option h3 {
        font-size: 16px;
    }

    #window-design {
        margin-top: 40px;
    }

    .radio-group {
        flex-wrap: wrap;
        margin: 15px 10px;
    }

    .radio-group label, .unit-type {
        padding: 8px 15px;
        font-size: 14px;
    }

    .measurement-row {
        flex-direction: column;
        gap: 10px;
        padding: 15px 10px;
        background: #f9f9f9;
        border-radius: 8px;
        margin-bottom: 15px;
    }

    .measurement-row span {
        width: 100%;
        text-align: center;
        font-weight: 600;
        color: #2980b9;
    }

    .measurement-row input {
        width: 90% !important;
        max-width: 300px;
        padding: 10px;
        font-size: 15px;
    }

    .delete-window {
        position: relative;
        right: 0;
        margin-top: 10px;
        padding: 5px 10px;
        background: #e74c3c;
        color: white;
        border-radius: 5px;
        display: inline-block;
    }

    .add-window {
        font-size: 16px;
        padding: 12px 20px;
        background: #2980b9;
        color: white;
        border-radius: 30px;
        margin: 20px auto;
    }

    .fixed-footer {
        padding: 20px 10px;
        font-size: 16px;
    }

    button#resetButton, #calculate-btn button {
        padding: 10px 20px;
        font-size: 16px;
    }

    .modal {
        padding: 15px;
    }

    .modal-content {
        width: 95%;
        margin: 0 auto;
        padding: 20px;
    }

    .modal-content h2 {
        font-size: 18px;
    }

    .modal-content input {
        padding: 10px;
        font-size: 14px;
    }
}

/* Mobile (Portrait - Small Screens) */
@media (max-width: 480px) {
    #shutter-calculator {
        padding: 5px;
        font-size: 14px;
        line-height: 22px;
    }

    #shutter-calculator h2, #shutter-calculator h3 {
        font-size: 18px;
        line-height: 22px;
    }

    .section {
        padding: 15px;
        border-radius: 8px;
    }

    .section h2 {
        font-size: 18px;
    }

    .section p {
        font-size: 12px;
    }

    .option {
        padding: 15px 10px;
    }

    .option img {
        max-width: 140px;
        margin: 10px 0;
    }

    .option h3 {
        font-size: 14px;
        margin-top: 5px;
    }

    .option .circle {
        width: 20px;
        height: 20px;
        top: 10px;
        right: 10px;
    }

    .option.selected .circle::after {
        width: 8px;
        height: 8px;
    }

    #window-design {
        margin-top: 20px;
    }

    .radio-group label, .unit-type {
        padding: 6px 12px;
        font-size: 13px;
    }

    .measurement-row input {
        width: 95% !important;
        padding: 8px;
        font-size: 14px;
    }

    .fixed-footer {
        padding: 15px 8px;
        font-size: 14px;
    }

    button#resetButton, #calculate-btn button {
        padding: 8px 16px;
        font-size: 14px;
        border-radius: 25px;
    }

    .modal {
        padding: 10px;
    }

    .modal-content {
        width: 98%;
        padding: 15px;
        margin: 0 auto;
    }

    .modal-content h2 {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .modal-content input {
        padding: 8px;
        font-size: 13px;
        margin-bottom: 15px;
    }

    .modal-content button {
        padding: 10px 15px;
        font-size: 14px;
    }

    .close-button {
        font-size: 20px;
        top: 10px;
        right: 15px;
    }
}

/* Extra Small Devices */
@media (max-width: 360px) {
    #shutter-calculator {
        padding: 3px;
    }

    .section {
        padding: 10px;
    }

    .option img {
        max-width: 120px;
    }

    .option h3 {
        font-size: 13px;
    }

    .measurement-row input {
        font-size: 13px;
    }
}


