/* General Body Styling */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f9;
    line-height: 1.6;
}

/* Header Styling */
header {
    text-align: center;
    padding: 20px;
    background: #007aff;
    color: white;
}

header h1 {
    font-size: 1.8rem;
    margin: 0;
}

/* Container and Main Styling */
.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.form-container {
    max-width: 500px;
    margin: 36px auto;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

main {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
}

/* Heading Styling */
h1 {
    text-align: center;
    color: #333;
}

h2 {
    color: #007aff;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

/* Form Styling */
form label {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
    color: #555;
}

form input, form select, form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 14px;
}

form button, .btn {
    display: inline-block;
    padding: 10px 15px;
    background: #007aff;
    border: none;
    color: white;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-align: center;
}

form button:hover, .btn:hover {
    background-color: #005bb5;
}


.btn.label {
    display: inline-block;
    background: linear-gradient(135deg, #007BFF, #0056b3); /* Smooth gradient blue */
    color: #fff;
    font-size: 10px;
    font-weight: normal;
    text-transform: uppercase;
    padding: 6px 6px;
    border: none;
    border-radius: 6px; /* Slightly rounded corners */
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn.label:hover {
    background: linear-gradient(135deg, #0056b3, #004494); /* Darker shade on hover */
    transform: translateY(-2px); /* Slight lift */
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2);
}

.btn.label:active {
    transform: translateY(1px); /* Button press effect */
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
}




/* Links Styling */
a {
    color: #007aff;
    text-decoration: none;
    font-size: 14px;
}

a:hover {
    text-decoration: underline;
}

/* Table Styling */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 14px;
}

table th, table td {
    text-align: left;
    padding: 10px;
    border: 1px solid #ddd;
}

table th {
    background-color: #f4f4f4;
    color: #333;
}

table tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Status Messages */
.status {
    text-align: center;
    margin-top: 10px;
    font-size: 14px;
    color: #333;
}

.status.error {
    color: red;
}

.status.success {
    color: green;
}

/* Loader */
.loader {
    border: 4px solid #f3f3f3;
    border-radius: 50%;
    border-top: 4px solid #007aff;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */

/* Mobile Styling */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.5rem;
    }

    .container {
        padding: 15px;
        margin: 10px auto;
        max-width: 100%;
    }

    table th, table td {
        font-size: 12px;
        padding: 8px;
    }

    form button, .btn {
        font-size: 14px;
        padding: 8px;
    }
}

/* Tablet Styling */
@media (min-width: 769px) and (max-width: 1024px) {
    header h1 {
        font-size: 1.6rem;
    }

    .container {
        padding: 20px;
        margin: 20px auto;
        max-width: 90%;
    }

    table th, table td {
        font-size: 13px;
        padding: 10px;
    }
}

/* Laptop Styling */
@media (min-width: 1025px) {
    header h1 {
        font-size: 2rem;
    }

    .container {
        max-width: 1200px;
        padding: 30px;
        margin: 30px auto;
    }

    table th, table td {
        font-size: 14px;
        padding: 10px;
    }
}


.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000; /* Ensure it's above other elements */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5); /* Black background with transparency */
}

.modal-content {
    background-color: #fff;
    margin: 15% auto; /* Center modal */
    padding: 20px;
    border: 1px solid #888;
    width: 40%; /* Adjust modal width */
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.modal .close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.modal .close:hover,
.modal .close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}


// Open Add User Modal
function openAddUserModal() {
    const modal = document.getElementById('addUserModal');
    modal.style.display = 'block';
}

// Close Add User Modal
function closeAddUserModal() {
    const modal = document.getElementById('addUserModal');
    modal.style.display = 'none';
}

// Close Modal on Outside Click
window.onclick = function (event) {
    const addModal = document.getElementById('addUserModal');
    if (event.target === addModal) {
        closeAddUserModal();
    }
};





/* Profile Card Styling */
.profile-body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #f4f4f9; /* Light gray */
}

.profile-card {
    max-width: 600px;
    margin: 20px auto;
    padding: 15px;
    background: #ffffff;
    border-radius: 11px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center; 
    position: relative; /* Added for positioning the button */
    box-sizing: border-box; /* Ensures padding doesn't affect width */
}

.profile-header {
    margin-bottom: 5px;
}

.profile-header h1 {
    color: #1e3a8a;
    font-family: "Times New Roman", Times, serif, "Playfair Display", "Didot";
    margin-bottom: 1px;
    margin-top: 20px;
    height: 30px !important;
    white-space: nowrap; /* Prevents text from wrapping */
    overflow: hidden; /* Hides overflow if text is too long */
    text-overflow: ellipsis; /* Adds "..." if text is cut off */
    max-width: 100%; /* Ensures it stays within the container */
    font-size: clamp(26px, 2vw, 26px); /* Dynamically adjust font size */
}

.profile-header h2 {
    color: #4b5563;
    margin-bottom: 1px;
    margin-top:10px;
    font-size: 21px;
}

.profile-header h3 {
    color: #6b21a8;
    margin-bottom: 1px;
    margin-bottom: 1px;
    margin-top:1px;
}

.profile-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-bottom: 0 px;
    object-fit: cover;
    border: 2px solid #007aff;
}

.profile-details {
    text-align: left;
}

.profile-details p {
    font-size: 1rem;
    color: #555;
    margin: 8px 0;
    display: flex;
    align-items: center;
}

.profile-details a {
    color: #007aff;
    text-decoration: none;
}

.profile-details a:hover {
    text-decoration: underline;
}





.profile-h2 {
    text-align: left;
}

.profile-h3 {
    text-align: left;
}




/* Add to Contact Button Styling */
.add-to-contact {
    margin-top: 20px;
    text-align: right; /* Aligns the button to the right */
}

.add-to-contact a {
    display: inline-block;
    padding: 12px 24px;
    background-color: #007aff;
    color: white;
    font-size: 1rem;
    font-weight: bold;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Adds a subtle shadow */
    text-align: center; /* Center-aligns the text within the button */
    cursor: pointer; /* Ensures it looks clickable */
}


.add-to-contact a:hover {
    background-color: #005bb5;
    transform: scale(1.05); /* Slight zoom effect on hover */
}

.add-to-contact a:active {
    transform: scale(0.98); /* Slight shrink effect on click */
}


/* Responsive Design for Small Devices */
@media (max-width: 768px) {
    .profile-card {
        margin: 20px auto; /* Ensures center alignment for mobile */
        padding: 15px; /* Adjust padding for smaller screens */
    }

    .add-to-contact {
        text-align: right; /* Center-align the button on mobile */
        margin-top: 15px; /* Adjust spacing */
    }

    .add-to-contact a {
        padding: 10px; /* Increase padding for better touch targets */
        font-size: 1.1rem; /* Slightly larger font for mobile readability */
    }
}




.icon-phone::before {
    content: "📞";
    margin-right: 10px;
}

.icon-email::before {
    content: "✉️";
    margin-right: 10px;
}

.icon-location::before {
    content: "📍";
    margin-right: 10px;
}

.icon-website::before {
    content: "🌐";
    margin-right: 10px;
}

/* Body Padding for Small Devices */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0 20px; /* Adds padding to the left and right */
    background-color: #f4f4f9;
}

.qr-code-section {
    text-align: left;
    margin: 20px 0;
}

.qr-code-image {
    max-width: 150px; /* Set a fixed size for the QR code image */
    height: auto;
    margin: 10px 0; /* Add spacing between the image and the text */
    display: block; /* Ensure the image is centered */
}

.qr-code-section .btn {
    margin-top: 10px; /* Add spacing between the image and the button */
}