/*
    ================================================================
    Refined CSS Theme for the Pro Schedule Table-Based Layout
    ================================================================
    This theme applies modern styling to the existing HTML structure.
*/

/* --- Base & Body --- */
body,
body *:not(html):not(style):not(br):not(tr):not(code) {
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
    position: relative;
}

body {
    -webkit-text-size-adjust: none;
    background-color: #f4f7f9; /* Soft, modern background */
    color: #4A5568; /* Readable dark gray */
    height: 100%;
    line-height: 1.5;
    margin: 0;
    padding: 0;
    width: 100% !important;
}

/* --- Layout Tables & Wrappers --- */
.mail-body {
    background-color: #f4f7f9;
    width: 100%;
}

.mail-body .container {
    display: block;
    margin: 0 auto !important;
    max-width: 600px;
    padding: 10px;
    width: 600px;
}

.mail-body .content {
    box-sizing: border-box;
    display: block;
    margin: 0 auto;
    max-width: 600px;
    padding: 10px;
}

/* --- The Main Email "Card" --- */
.mail-body .main {
    background: #FFFFFF;
    border-radius: 8px; /* Rounded corners */
    width: 100%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07); /* Subtle shadow */
    border: 1px solid #E2E8F0; /* Faint border */
}

.mail-body .wrapper {
    box-sizing: border-box;
    padding: 40px; /* Generous padding */
}

/* --- Header & Logo --- */
.mail-body .header {
    padding: 30px 0;
    text-align: center;
}

.mail-body .header img {
    height: 50px !important; /* Ensure consistent logo size */
    width: auto !important;
    max-width: 200px !important;
}

/* --- Typography --- */
a {
    color: #3B82F6;
    text-decoration: none;
}

p, ul, ol {
    font-family: sans-serif;
    font-size: 16px;
    font-weight: normal;
    margin: 0;
    margin-bottom: 16px;
    line-height: 1.625;
}

h1 {
    color: #1A202C;
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    margin-bottom: 24px;
}

p.small, small {
    font-size: 13px;
    color: #718096;
}

/* --- Action Buttons (Refined from your classes) --- */
.mail-body .btn > tbody > tr > td {
    padding-bottom: 16px;
}

.mail-body .btn a {
    border-radius: 6px;
    box-sizing: border-box;
    cursor: pointer;
    display: inline-block;
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    padding: 12px 25px;
    text-decoration: none;
    text-transform: capitalize;
    transition: all 0.2s ease-in-out;
}

/* Primary "Add to Calendar" style buttons */
.mail-body .btn-primary a,
.calendar__button a {
    background-color: #3B82F6;
    border: solid 1px #3B82F6;
    color: #ffffff;
}

/* Secondary "Reschedule/Cancel" style buttons */
.reschedule__cancel a {
    background-color: transparent;
    border: solid 1px #A0AEC0;
    color: #4A5568 !important; /* Use !important to override inline styles if necessary */
    padding: 8px 18px !important;
    font-size: 14px !important;
}

/* To give some space between the calendar and reschedule buttons */
.calendar__button {
    padding-bottom: 20px;
}

/* --- Footer --- */
.mail-body .footer {
    clear: both;
    margin-top: 10px;
    text-align: center;
    width: 100%;
}

.mail-body .footer td,
.mail-body .footer p,
.mail-body .footer span,
.mail-body .footer a {
    color: #A0AEC0;
    font-size: 13px;
    text-align: center;
}

/* --- Utility & Reset --- */
.preheader {
    color: transparent;
    display: none;
    height: 0;
    max-height: 0;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    mso-hide: all;
    visibility: hidden;
    width: 0;
}

hr {
    border: 0;
    border-bottom: 1px solid #E2E8F0;
    margin: 25px 0;
}

/* Media query for mobile responsiveness */
@media only screen and (max-width: 620px) {
    table.body h1 {
        font-size: 28px !important;
        margin-bottom: 10px !important;
    }
    table.body p, table.body ul, table.body ol, table.body td, table.body span, table.body a {
        font-size: 16px !important;
    }
    table.body .wrapper, table.body .article {
        padding: 20px !important; /* Adjusted mobile padding */
    }
    table.body .content {
        padding: 0 !important;
    }
    table.body .container {
        padding: 0 !important;
        width: 100% !important;
    }
    table.body .main {
        border-left-width: 0 !important;
        border-radius: 0 !important;
        border-right-width: 0 !important;
    }
    table.body .btn table, .calendar__button table {
        width: 100% !important;
    }
    table.body .btn a, .calendar__button a {
        width: 100% !important;
        box-sizing: border-box !important;
        text-align: center !important;
    }
    .calendar__button td {
        display: block !important;
        padding-bottom: 10px;
    }
}
