/*
Elegant Professional Template Styles (Dompdf Compatible Layout)
These styles define the visual appearance and layout using subtle elements and whitespace.
Core UI styles are in css/style.css.
Dynamic settings (font, color, spacing) are applied via inline/CSS variables and override these where !important is used or specificity is higher.
*/

/* Overall template wrapper (added by app.js) */
/* Apply padding via the body style generated in PHP, not here */
.rb-template-elegant {
    padding: 0; /* Padding handled by body in PDF */
    width: 100%; /* Ensure it uses available width */
    box-sizing: border-box;
    background-color: #fff; /* Explicitly white background for the page */
    /* Theme color variable is available from the body */
    /* Font family and size inherited from dynamic CSS overrides */
}

/* Basic Header - Can be centered or left-aligned based on preference */
.rb-template-elegant .rb-header {
    text-align: left; /* Left-aligned header */
    margin-bottom: 30px; /* More space below header */
}
.rb-template-elegant .rb-header h1 { /* Name */
    margin: 0 0 5px 0;
    font-size: 2.2em; /* Slightly larger name */
    font-weight: 700; /* Bold */
    /* Color inherited from heading settings */
    /* Font family inherited from heading settings (Montserrat works well here) */
}
.rb-template-elegant .rb-header h2 { /* Job Title/Tagline */
    margin: 0;
    font-size: 1.3em; /* Slightly larger tagline */
    font-weight: 400; /* Lighter weight */
    color: #555; /* Slightly muted color */
    /* Font family inherited from heading settings */
}

/* Contact Info Styles */
/* Use display: inline-block with spacing for a single line look */
.rb-template-elegant .rb-contact-info {
    margin-top: 10px; /* Space below name/tagline */
    margin-bottom: 25px; /* More space before the first section */
    text-align: left; /* Align contact info left */
}
.rb-template-elegant .rb-contact-info span {
    display: inline-block; /* Arrange items in a line */
    margin-right: 15px; /* Space between contact items */
    font-size: 0.95em; /* Slightly smaller font */
     /* Color inherited from text settings */
     /* Add separators between items */
}
.rb-template-elegant .rb-contact-info span:last-child {
    margin-right: 0;
}
/* Add a subtle separator icon or text */
.rb-template-elegant .rb-contact-info span:not(:last-child)::after {
    content: " · "; /* Dot separator */
    margin-left: 15px; /* Space for the separator */
    color: #ccc; /* Light grey separator */
}

/* Contact Icons (Placeholder classes) - Optional */
/* If using icons, style them here */
/*
.rb-template-elegant .rb-contact-info span::before {
    content: "";
    display: inline-block;
    width: 1.2em;
    text-align: center;
    font-size: 1.1em;
    color: var(--rb-theme-color, #0073aa);
    margin-right: 8px;
    vertical-align: middle;
}
*/


/* Section Styles */
.rb-template-elegant .rb-section {
    margin-bottom: 25px; /* Increased space between sections */
    padding-bottom: 0; /* No border-bottom, so no padding needed */
    border-bottom: none; /* No section divider line */
    page-break-inside: avoid; /* Hint for print/PDF */
}
.rb-template-elegant .rb-section:last-child {
    margin-bottom: 0;
}

/* Section Titles */
.rb-template-elegant h2.rb-section-title { /* Use rb-section-title class for specific targeting */
    margin-top: 0;
    margin-bottom: 0.8em; /* Space below title */
    font-size: 1.5em; /* Adjust size */
    font-weight: 600; /* Semi-bold */
    text-transform: uppercase;
    letter-spacing: 1.5px; /* Increased letter spacing */
    /* Color inherited from heading settings */
    /* Font family inherited from heading settings (Montserrat works well here) */
    border-bottom: none; /* Remove basic template border */
    display: block; /* Ensure it takes full width */
    padding-bottom: 0;
    position: relative; /* Needed for pseudo-element underline */
    margin-right: 0; /* Remove potential inline-block margin */
}
/* Add a subtle underline using a pseudo-element */
.rb-template-elegant h2.rb-section-title::after {
    content: "";
    display: block;
    width: 50px; /* Fixed width underline */
    height: 2px; /* Thin line */
    background-color: var(--rb-theme-color, #0073aa); /* Use theme color for underline */
    margin-top: 5px; /* Space between title and underline */
}


/* Education and Experience Entry Styles */
.rb-template-elegant .rb-education-entry,
.rb-template-elegant .rb-job-entry,
.rb-template-elegant .rb-reference-entry,
.rb-template-elegant .rb-custom-entry { /* Include custom entries */
    margin-bottom: 20px; /* More space between entries in a list */
    padding-bottom: 15px; /* Add padding for a subtle bottom line */
    border-bottom: 1px dashed #eee; /* Subtle dashed line separator */
    page-break-inside: avoid; /* Hint for print/PDF */
}
.rb-template-elegant .rb-education-entry:last-child,
.rb-template-elegant .rb-job-entry:last-child,
.rb-template-elegant .rb-reference-entry:last-child,
.rb-template-elegant .rb-custom-entry:last-child { /* Include custom entries */
    margin-bottom: 0; /* Remove margin from the last entry */
    padding-bottom: 0;
    border-bottom: none; /* Remove border from the last entry */
}


.rb-template-elegant h4 { /* Used for Job Title, Degree, Reference Name, Custom Entry Title */
    margin-top: 0;
    margin-bottom: 0.3em; /* Space below title */
    font-size: 1.1em; /* Slightly larger and more prominent */
    font-weight: 700; /* Bold */
    /* Color inherited from heading settings */
}

/* Italic text for dates/location/institution/reference details */
.rb-template-elegant em {
    font-style: italic;
    color: #666; /* Slightly greyed out */
    font-size: 0.95em; /* Slightly smaller italic text */
}

/* Paragraphs within entries (e.g., education details, summary paragraphs, reference details, custom details) */
.rb-template-elegant p {
    margin-top: 0.5em; /* More space above paragraphs */
    margin-bottom: 0.8em; /* Space between paragraphs/items */
    /* Color inherited from text settings */
    /* Line height inherited from body/text settings */
}
.rb-template-elegant p:last-child {
    margin-bottom: 0;
}

/* Lists (e.g., experience bullet points, skills) */
.rb-template-elegant ul {
    padding-left: 25px; /* Increased list padding */
    margin-top: 0.8em; /* More space above lists */
    margin-bottom: 0.8em;
}
.rb-template-elegant ul:last-child {
     margin-bottom: 0;
}

.rb-template-elegant li {
    margin-bottom: 0.6em; /* More space between list items */
     /* Color inherited from text settings */
     /* Line height inherited from body/text settings */
}
.rb-template-elegant li:last-child {
     margin-bottom: 0;
}

/* Specific styling for the Skills ul */
.rb-template-elegant .rb-skills-section ul {
    list-style: none; /* Remove default bullets from skills list */
    padding: 0;
    margin: 0.5em 0;
    display: flex; /* Use flex for inline skills */
    flex-wrap: wrap; /* Allow wrapping */
    gap: 10px 20px; /* Space between items and columns */
}
.rb-template-elegant .rb-skills-section li {
    margin-bottom: 0; /* Remove margin from flex items */
    font-size: 0.95em; /* Slightly smaller text */
     /* Color inherited from text settings */
     /* Add a custom bullet point using theme color */
     position: relative;
     padding-left: 15px; /* Space for the custom bullet */
}
/* Add a custom bullet point using theme color */
.rb-template-elegant .rb-skills-section li::before {
     content: "•"; /* Custom bullet for skills list */
     color: var(--rb-theme-color, #0073aa); /* Use theme color */
     display: inline-block;
     position: absolute;
     left: 0;
     top: 0;
     font-weight: bold;
}


/* Reference Contact Info - Stack vertically */
.rb-template-elegant .rb-contact-info-small span {
    display: block; /* Stack items vertically */
    margin-bottom: 5px;
    font-size: 0.9em; /* Smaller font */
    /* Color inherited from text settings */
}
.rb-template-elegant .rb-contact-info-small span:last-child {
    margin-bottom: 0;
}


/* Links */
.rb-template-elegant a {
    /* Link color/text-decoration handled by dynamic CSS overrides */
    /* Add any specific link styles here if needed */
}


/* Footer */
.rb-template-elegant .rb-footer {
    text-align: center;
    padding: 20px 0 10px 0;
    margin-top: 30px; /* More space above footer */
    border-top: 1px solid #eee; /* Divider line */
    font-size: 0.8em;
    color: #888;
}
.rb-template-elegant .rb-footer p {
    margin: 0;
    padding: 0;
}

/* Ensure images scale */
.rb-template-elegant img {
    max-width: 100%;
    height: auto;
}

/* Clearfix utility - use on parents of floats */
.rb-clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* Responsive Adjustments are generally not needed for the PDF specific CSS */
/* since the output size is fixed (A4). */
/* The styles should aim for the target PDF layout directly using floats. */
