/**
 * Calculator Modal Styles
 */

.calculator-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(2px);
}

.calculator-modal {
    background: white;
    border-radius: 8px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calculator-modal h2 {
    margin: 0 0 10px 0;
    font-size: 24px;
    color: #333;
    text-align: center;
}

.calculator-modal > p {
    text-align: center;
    color: #666;
    margin: 0 0 25px 0;
    font-size: 14px;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #333;
}

.modal-field {
    margin-bottom: 20px;
}

.modal-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.modal-field .required {
    color: #e74c3c;
}

.modal-field input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.modal-field input:focus {
    outline: none;
    border-color: #2aa4da;
    box-shadow: 0 0 0 3px rgba(42, 164, 218, 0.1);
}

.field-error {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.modal-message {
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
    display: none;
}

.modal-message-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.modal-message-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.modal-submit {
    width: 100%;
    padding: 12px;
    background-color: #2aa4da;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.modal-submit:hover:not(:disabled) {
    background-color: #1e8bc3;
}

.modal-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Mobile responsiveness */
@media (max-width: 600px) {
    .calculator-modal {
        padding: 30px 20px;
        margin: 20px;
    }

    .calculator-modal h2 {
        font-size: 20px;
    }

    .modal-field input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}
