.register-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.form-field {
    display: flex;
    gap: 15px;
    position: relative;
    width: 100%;
}
.form-field > * {
    flex: 1 1 0;
    min-width: 0;
    
}

#product-rows-container {
    clear: both;
    width: 100%;
    display: block;
    margin-top: 20px;
}

.product-row {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    position: relative;
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    background-color: #f9f9f9;
}

.product-row .form-field {
    flex: 1;
    min-width: 200px;
}

.mandatory-row {
    width: 100%;
}

.mandatory-row .delete-row-icon {
    visibility: hidden;
}

.delete-row-icon {
    color: #ff4d4d;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    margin-left: auto;
    padding: 0 10px;
    transition: color 0.3s ease;
    align-self: center;
    padding-top: 20px;
}

.delete-row-icon:hover {
    color: #e60000;
}

#add-row-button {
    width: auto;
    padding: 8px 15px;
    margin-top: 15px;
    display: block;
    margin-left: auto;
    margin-right: 0;
}

.success-message, .error-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

#close-message {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: inherit;
}

.addmore-btn {
    background: linear-gradient(to left, #eb3333, #a05252);
    color: white;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
}

.suggestions-dropdown {
    position: absolute;
    top: calc(100% + 1px); /* Position directly below the input field with a small gap */
    left: 0;
    width: 100%; /* Match the width of the input field */
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    max-height: 150px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Add a subtle shadow for better visibility */
}

.suggestions-dropdown div {
    padding: 8px;
    cursor: pointer;
}

.suggestions-dropdown div:hover {
    background-color: #f0f0f0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .form-field {
        width: 100%;
        position: relative;
    }
    .product-row {
        flex-direction: column;
        padding: 10px;
    }
    .product-row .form-field {
        min-width: 100%;
    }
    .delete-row-icon {
        align-self: flex-end;
        margin-top: 10px;
    }
    #add-row-button {
        margin-left: 0;
        margin-right: 0;
    }
    .register-container {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .form-field label {
        font-size: 14px;
    }
    .form-field input, .form-field select, .form-field textarea {
        font-size: 14px;
        width: 100%;
        box-sizing: border-box;
    }
    .addmore-btn {
        font-size: 10px;
        padding: 6px 10px;
    }
}
