body::-webkit-scrollbar{
    display: none; /* For Chrome, Safari, and Opera */
}

.container {
    min-height: calc(100vh - 80px);
    margin-top: 80px;
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom, #7D0000, #C00000, #D32F2F, #E57373);
}

.form-box {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    width: 70%;
}

h1 {
    color: #7b0000;
    font-size: 24px;
    text-align: center;
    border-bottom: rgb(0, 0, 0,0.3) 1px solid;
}

.form-desc{
    text-align: center;
    font-size: 14px;
    padding: 15px 0;
}

.form-container{
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.row > div {
    flex: 1;
}

.row > div.med-name{
    flex: 2;
}

.row .file-upload{
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 10px;
    width: 100%;
    gap: 10px;
}

#medicine-group{
    display: flex;
    flex-direction: column;
    gap: 10px;
}

input[type="text"],
input[type="date"],
input[type="number"],
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
}

input[type="file"] {
    display: none;
}

.custom-file-upload {
    display: inline-block;
    background-color: #3399cc;
    color: white;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#file-name{
    font-size: 14px;
}
  
.custom-file-upload i {
    margin-right: 8px;
}

.custom-file-upload:hover {
    background-color: #2b7da5;
}
  

textarea {
    resize: vertical;
}

.add-medicine-btn,
input[type="file"]::file-selector-button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 8px 14px;
    font-size: 14px;
    border-radius: 4px;
    margin-top: 8px;
    cursor: pointer;
}

.add-medicine-btn:hover,
input[type="file"]::file-selector-button:hover {
    background-color: #2c80b4;
}

.remove-medicine-btn {
    background: #e74c3c;
    border: none;
    color: white;
    padding: 8px;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    height: fit-content;
}

.remove-medicine-btn:hover {
    background: #c0392b;
}

.checkbox-label {
    display: flex;
    width: 100%;
    align-items: center;
    margin-top: 20px;
}

.checkbox-label input[type="checkbox"] {
    width: 30px;
    margin-right: 10px;
    transform: scale(1.2);
}

.submit-btn {
    background-color: #7D0000;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 6px;
    width: 100%;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: #5a0000;
}


/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(3px);
}

.modal.show {
    display: flex;
}

.modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    animation: popUp 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28) both;
}

.modal-content h2 {
    color: #d9534f;
}

/* Icon Circle */
.modal-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: white;
}

/* Title */
.modal-content h2 {
    margin: 0 0 12px;
    font-size: 1.7rem;
    font-weight: 700;
}

/* Message */
.modal-content p {
    margin: 0 0 24px;
    font-size: 1rem;
    color: #444;
    line-height: 1.5;
}

/* Buttons */
.modal-content button {
    min-width: 120px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal .modal-icon {
    background: linear-gradient(135deg, #D32F2F, #E57373);
    box-shadow: 0 6px 16px rgba(211, 47, 47, 0.3);
}

.modal h2 {
    color: #B71C1C;
}

.btn, .btn-primary {
    background: #D32F2F;
    color: white;
}

.btn:hover, .btn-primary:hover {
    background: #C62828;
    box-shadow: 0 6px 12px rgba(198, 40, 40, 0.3);
}

.error-message {
    color: red;
    font-size: 0.9em;
    margin-top: 4px;
    display: flex;
}

.required::after {
    content: " *";
    color: red;
}

.field-hint {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    font-style: italic;
    display: block;
}


/* ============================= */
/* RESPONSIVE STYLES */
/* ============================= */

/* ====== Small Devices (≤600px) ====== */
@media (max-width: 600px) {
    .container{
        margin-top: 70px;
        padding: 0;
    }

    .form-desc{
        padding: 10px 0;
        font-size: 0.8rem;
    }

    .form-box {
        width: 100%;
        padding: 20px;
        border-radius: 0;
    }

    label{
        font-size: 0.9rem;
    }

    #medicine-group label{
        font-size: 0.7rem;
    }

    .field-hint{
        font-size: 11px;
    }

    h1 {
        font-size: 1.6rem;
    }

    .row {
        gap: 10px;
    }

    .custom-file-upload {
        width: 100%;
        text-align: center;
    }

    .file-upload {
        flex-direction: column;
        align-items: flex-start;
    }

    #file-name {
        word-break: break-all;
    }

    .checkbox-label {
        flex-direction: row;
        align-items: flex-start;
        font-size: 13px;
    }

    .submit-btn {
        font-size: 16px;
        padding: 10px 20px;
    }

    .modal-content {
        padding: 24px;
        width: 88%;
    }
    .modal-icon {
        width: 60px;
        height: 60px;
        font-size: 1.9rem;
    }
    .modal-content h2 {
        font-size: 1.5rem;
    }
    .modal-content p {
        font-size: 0.95rem;
    }
    .modal-content button {
        width: 100%;
        padding: 12px;
        font-size: 1rem;
    }
}

/* ====== Medium Devices (601px–1024px) ====== */
@media (min-width: 601px) and (max-width: 1024px) {
    .form-box {
        width: 85%;
        padding: 30px;
    }

    h1 {
        font-size: 22px;
    }

    .row {
        flex-wrap: wrap;
        gap: 15px;
    }

    .custom-file-upload {
        padding: 10px 16px;
        font-size: 14px;
    }

    .submit-btn {
        font-size: 17px;
    }

    .modal-content {
        width: 60% !important;
    }
}

/* ====== Large Devices (≥1025px) ====== */
@media (min-width: 1025px) {
    .form-box {
        width: 70%;
    }
}