/* General Reset */
body, html {
    margin: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

/* General Styling */

body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: #f8f9fa;
    color: #333;
    padding: 20px;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 2rem;
    color: #333;
}

footer {
    margin-top: 30px;
    padding: 20px 0;
    background: #007bff;
    color: #fff;
    text-align: center;
}

footer p {
    margin: 0;
    font-size: 0.9rem;
}
/* General Styling for index.php */
.links-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}
.link-card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
    width: 250px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.link-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.link-card a {
    text-decoration: none; /* Remove underlines */
    color: inherit; /* Inherit parent color */
    display: block; /* Make the link cover the entire card */
    height: 100%; /* Ensure it fills the card */
}

.link-card h2 {
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0 0 10px;
}

.link-card p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
}

/* Button Styling */
.top-button {
    display: block;
    width: fit-content;
    margin: 0 auto 20px auto;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    text-align: center;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.top-button:hover {
    background-color: #0056b3;
}

/* Form Styling */
.form-container {
    margin-bottom: 20px;
    background: #ffffff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

form input, form textarea, form button {
    width: 100%;
    margin-bottom: 15px;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

form button {
    background-color: #007bff;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

form button:hover {
    background-color: #0056b3;
}

/* Messages */
.success-message {
    color: green;
    text-align: center;
    margin: 15px 0;
}

.error-message {
    color: red;
    text-align: center;
    margin: 15px 0;
}

.no-services-message {
    text-align: center;
    font-size: 1.2rem;
    color: #666;
}

/* Table Styling */
.table-container {
    overflow-x: auto; /* Horizontal scrolling for small screens */
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

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

table th {
    background-color: #f8f9fa;
}

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

.edit-button {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.edit-button:hover {
    background-color: #218838;
}

.delete-button {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.delete-button:hover {
    background-color: #c82333;
}

.modal-delete {
    background-color: #dc3545; /* Red background */
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.modal-delete:hover {
    background-color: #c82333; /* Darker red on hover */
}

a.modal-save {
    background-color: #007bff;
    color: white;
    padding: 5px 12px;
    text-decoration: none;
    border-radius: 5px;
}

#payment_deposit {
    margin-bottom: 10px;
    border-left: 3px solid #a1d1ff;
    padding-left: 8px;
}
        .calendar {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 5px;
            max-width: 1000px;
            margin: 0 auto;
        }

        .day {
            background-color: white;
            border: 1px solid #dee2e6;
            border-radius: 5px;
            padding: 10px;
            min-height: 100px;
            display: flex;
            flex-direction: column;
        }

        .day-header {
            font-weight: bold;
            margin-bottom: 5px;
            text-align: right;
        }

        .day.empty {
            background-color: #f1f3f5;
        }

        /* Highlight today */
        .day.today {
            background-color: #eaf5ff;
            border: 2px solid #007bff;
            border-radius: 5px;
        }



        .appointment {
            font-size: 12px;
            margin-top: 5px;
            padding: 5px;
            background-color: #007bff;
            color: white;
            border-radius: 3px;
            cursor: pointer;
        }

        .appointment:hover {
            background-color: #0056b3;
        }

        .appointment.deposit-made {
            background-color: #ffe3e3; /* Light red to indicate deposit */
            border: 1px solid #ff9999;
            color: #a70000;
        }

        /* Cancelled Appointment Style */
        .appointment.cancelled {
            background-color: #ffa500; /* Orange background */
            color: #fff; /* White text for contrast */
            border: 1px solid #cc8400; /* Darker orange border */
            text-decoration: line-through;
            opacity: 0.8; /* Slightly faded to visually distinguish */
        }
        
        .appointment.cancelled:hover {
            background-color: #e69500; /* Darker orange on hover */
            opacity: 1; /* Full opacity on hover */
        }

        .controls {
            text-align: center;
            margin-bottom: 20px;
        }

        .controls a {
            margin: 0 10px;
            text-decoration: none;
            color: #007bff;
            font-weight: bold;
        }

        .controls a:hover {
            text-decoration: underline;
        }

        /* Modal Styling */
        .modal {
            display: none;
            position: fixed;
            z-index: 1000;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
            justify-content: center;
            align-items: center;
        }

        .modal-content {
            background: white;
            border-radius: 8px;
            padding: 20px;
            width: 90%;
            max-width: 500px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
            max-height: 90vh;     /* Prevents modal from exceeding viewport */
            overflow-y: auto;     /* Enables vertical scrolling if content is too tall */
            box-sizing: border-box;
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .modal-header h2 {
            margin: 0;
        }

        .modal-close {
            background: none;
            border: none;
            font-size: 20px;
            cursor: pointer;
        }

        .modal-body label {
            font-weight: bold;
            margin-bottom: 5px;
        }

        .modal-body select, .modal-body input {
            width: 100%;
            margin-bottom: 15px;
            padding: 10px;
            font-size: 16px;
            border: 1px solid #ced4da;
            border-radius: 4px;
        }

        .modal-footer {
            text-align: right;
        }

        .modal-footer button {
            padding: 10px 20px;
            font-size: 16px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            transition: background-color 0.3s ease;
        }

        .modal-save {
            background-color: #007bff;
            color: white;
        }

        .modal-save:hover {
            background-color: #0056b3;
        }

        .modal-cancel {
            background-color: #6c757d;
            color: white;
        }

        .modal-cancel:hover {
            background-color: #5a6268;
        }

        .day-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .add-button {
            background-color: #e0f7fa; /* Subtle light blue color */
            color: #007bff; /* Blue text color */
            border: 1px solid #b2ebf2; /* Light border color */
            border-radius: 5px;
            padding: 5px 10px;
            cursor: pointer;
            font-size: 12px;
            transition: background-color 0.3s ease, color 0.3s ease;
        }
        
        .add-button:hover {
            background-color: #b2ebf2; /* Slightly darker blue on hover */
            color: #0056b3; /* Darker blue text color on hover */
        }
        
        .payment-button {
            background-color: #28a745;
            color: white;
            border: none;
            padding: 5px 10px;
            border-radius: 50%;
            cursor: pointer;
            font-size: 16px;
            margin-left: 10px;
            transition: background-color 0.3s ease;
        }
        
        .payment-button:hover {
            background-color: #218838;
        }
        
        .modal-payment {
            background-color: #007bff;
            color: white;
            border: none;
            border-radius: 50%;
            width: 30px;
            height: 30px;
            font-size: 18px;
            text-align: center;
            cursor: pointer;
            margin-left: 10px;
            transition: background-color 0.3s;
        }
        
        .modal-payment:hover {
            background-color: #0056b3;
        }
     
        .appointment.paid {
            background-color: #d4edda;
            border: 1px solid #c3e6cb;
            color: #155724;
        }
        
        .appointment.paid:hover {
            background-color: #ABEBC6;
            border: 1px solid #c3e6cb;
            color: #155724;
        }    

        .appointment.pending {
            background-color: yellow;
            color: black; /* Ensure text is readable on yellow background */
            border: 1px solid #e6c200; /* Optional: Add a border for better visibility */
            padding: 5px;
            border-radius: 5px;
        }

        .new-client {
            background-color: #9300FF     !important; /* Light red for new client unpaid */
            color: white;
            border: 1px solid;
        }
        
        .paid {
            background-color: #d4edda;
            border: 1px solid ;
            color: #155724;
        }

        .pending .unpaid {
            font-size: 12px;
            margin-top: 5px;
            padding: 5px;
            background-color: #007bff;
            color: white;
            border-radius: 3px;
            cursor: pointer;
        }

    .appointments-list {
        margin-top: 20px;
        padding: 10px;
    }
.appointments-list {
    display: flex;
    justify-content: center; /* Centers horizontally */
    align-items: center; /* Centers vertically if needed */
    width: 100%;
    overflow-x: auto; /* Enables horizontal scrolling on small screens */
    padding: 20px 0; /* Adds spacing */
}

.appointments-list table {
    border-collapse: collapse;
    width: 100%;
    max-width: 1000px; /* Ensures table does not exceed 1000px */
    margin: auto; /* Centers the table */
    text-align: left; /* Keeps text aligned properly */
}

.appointments-list th, .appointments-list td {
    border: 1px solid #ddd;
    padding: 10px;
}

.appointments-list th {
    background-color: #f4f4f4;
    text-align: left;
}

    .appointments-list button {
        cursor: pointer;
        padding: 5px 10px;
        background-color: #007bff;
        color: white;
        border: none;
        border-radius: 3px;
    }
    .appointments-list button:hover {
        background-color: #0056b3;
    }



#newClientForm {
    background-color: #f9f9f9;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

#addClientForm {
    background-color: #f9f9f9;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

#addClientForm h4 {
    margin-bottom: 10px;
    font-size: 1.2rem;
    color: #333;
}

#addClientForm input {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

#addClientForm button {
    background-color: #007bff;
    color: white;
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

#addClientForm button:hover {
    background-color: #0056b3;
}


/* Common Button Styling */
.action-button, .delete-button {
    display: inline-block; /* Ensure proper box model for both */
    text-align: center; /* Center text */
    background-color: #28a745; /* Default green for edit button */
    color: white; /* White text */
    border: none; /* Remove border */
    padding: 5px 10px; /* Equal padding for both buttons */
    cursor: pointer; /* Pointer cursor on hover */
    border-radius: 4px; /* Rounded corners */
    font-size: 14px; /* Uniform font size */
    max-width: 75px; /* Set a minimum width for consistency */
    transition: background-color 0.3s ease; /* Smooth hover effect */
}

/* Edit Button Specific Styling */
.action-button {
    background-color: #28a745; /* Green for edit */
}

.action-button:hover {
    background-color: #218838; /* Darker green on hover */
}

/* Delete Button Specific Styling */
.delete-button {
    background-color: #dc3545; /* Red for delete */
}

.delete-button:hover {
    background-color: #c82333; /* Darker red on hover */
}

.new-client {
    background-color: #ffcccb; /* Light red */
}

.recurring-client {
    background-color: #d4edda; /* Light green */
}

.delete-button {
    background-color: #dc3545;
    color: white;
    padding: 10px 20px;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.delete-button:hover {
    background-color: #c82333;
}

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

    .top-button {
        font-size: 14px;
        padding: 8px 16px;
    }

    form input, form textarea, form button {
        font-size: 14px;
        padding: 8px;
    }

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

    .edit-form input, .edit-form textarea {
        font-size: 14px;
        padding: 5px;
    }
}

.appointments-today {
    margin: 20px auto;
    padding: 15px;
    border: 1px solid #ccc;
    max-width: 700px;
    background: #fdfdfd;
    border-radius: 10px;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
}
.appointments-today ul {
    list-style-type: none;
    padding: 0;
}
.appointments-today li {
    margin: 8px 0;
    padding: 8px;
    border-bottom: 1px solid #eee;
}

/* Ultra-Small Devices */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    h1 {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }

    .top-button {
        font-size: 12px;
        padding: 6px 12px;
    }

    form input, form textarea, form button {
        font-size: 12px;
        padding: 6px;
    }

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

    .edit-form input, .edit-form textarea {
        font-size: 12px;
        padding: 4px;
    }

    .no-services-message {
        font-size: 1rem;
    }
}