/* Styling for the custom form container */
.custom-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #f9f9f9;
    margin-bottom: 30px; /* Space between the two sections */
}

.custom-form h5 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.2rem;
    color: #333;
}

/* Centering the loader and adding space from button */
.loader {
    display: block;
    margin: 20px auto 10px auto; /* Added top and bottom margin for better spacing */
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.response-box {
    background-color: #f1f1f1;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #ddd;
    white-space: pre-wrap;
    font-size: 1rem;
}

/* Styling for the form input and button */
.form-controlnew {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 1rem;
}

.form-controlnew:focus {
    border-color: #007bff;
    outline: none;
}

.btn-submitnew {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-submitnew:hover {
    background-color: #0056b3;
}

/* Loader animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
    .custom-form {
        padding: 15px;
        margin: 10px;
    }

    .form-controlnew {
        font-size: 0.9rem;
        padding: 10px;
    }

    .btn-submitnew {
        padding: 10px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .custom-form {
        padding: 10px;
        margin: 5px;
    }

    .form-controlnew {
        font-size: 0.8rem;
        padding: 8px;
    }

    .btn-submitnew {
        padding: 8px;
        font-size: 0.8rem;
    }
}
/* Loader Styles */
.loader {
    border: 4px solid #333; /* Darker border for the loader */
    border-top: 4px solid #007bff; /* Primary blue spinner */
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    display: none;
    margin: 10px auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Overlay */
#overlay {
    position: fixed;
    display: none;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent dark overlay */
    z-index: 2;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 6px solid #333;
    border-top: 6px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Form Response Styles */
pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 14px;
    color: #f5f5f5; /* Light text for readability */
    background-color: #2a2a2a; /* Match with card color */
}

/* Responsive Styles */
@media (max-width: 768px) {
    .card {
        margin-bottom: 20px;
    }

    .row {
        flex-direction: column;
    }
}