/* Common Variables */
:root {
    --primary: #2563eb;
    --bg: #f9fafb;
    --gray: #e5e7eb;
    --text: #334155;
    --accent: #f1f5f9;
    --out: #fca5a5;
}

/* Base Styles */
body {
    margin: 0;
    background: var(--bg);
    font-family: 'Segoe UI', Arial, sans-serif;
    color: var(--text);
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    color: white;
    padding: 4rem 1rem 6rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

.page-header::before {
    content: "";
    position: absolute;
    top: -50px;
    left: -50px;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 15s ease-in-out infinite alternate;
}

.page-header::after {
    content: "";
    position: absolute;
    bottom: -80px;
    right: -80px;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    animation: float 20s ease-in-out infinite alternate-reverse;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(20px, 20px) scale(1.05);
    }
    100% {
        transform: translate(-20px, -20px) scale(0.95);
    }
}

.page-header h1 {
    color: white;
    font-size: 3.5rem;
    margin: 0 0 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 2;
    font-weight: 800;
    letter-spacing: -1px;
}

.page-header p {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.25rem;
    opacity: 0.95;
    position: relative;
    z-index: 2;
    font-weight: 400;
    line-height: 1.6;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.page-header .header-icon {
    display: inline-block;
    margin-bottom: 1rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.wave-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg);
}

.wave-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 46px;
}

.wave-divider .shape-fill {
    fill: #F9FAFB;
}

/* Container Styles */
.container, .policy-container {
    max-width: 800px;
    margin: 3rem auto;
    background: #fff;
    border-radius: 1.5rem;
    box-shadow: 0 8px 24px #0001;
    padding: 2rem;
}

.policy-container {
    max-width: 750px;
    padding: 2.5rem 2rem;
}

/* Typography */
h1 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    padding-bottom: 0.5rem;
    position: relative;
}

h2 {
    color: var(--primary);
    font-size: 1.3rem;
    margin-top: 2rem;
    margin-bottom: 0.7rem;
    font-weight: 600;
}

h3 {
    color: var(--primary);
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
    border-bottom: 1px solid var(--gray);
    padding-bottom: 0.4rem;
}

p, ul, ol {
    font-size: 1.09rem;
    line-height: 1.75;
    margin-bottom: 1.2rem;
    color: var(--text);
}

ul, ol {
    padding-left: 1.4em;
}

a {
    color: var(--primary);
    text-decoration: underline;
}

/* Policy Page Specific */
.policy-container h1 {
    margin-top: 0;
    margin-bottom: 2.2rem;
    font-size: 2.25rem;
    letter-spacing: -1px;
}

.policy-container h3 {
    color: #1e293b;
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
    border-bottom: none;
    padding-bottom: 0;
}

.section {
    margin-bottom: 2rem;
}

.contact-box {
    background: var(--accent);
    border-radius: 0.7rem;
    padding: 1rem 1.4rem;
    margin-top: 0.7rem;
    font-size: 1.07rem;
    word-break: break-word;
    display: inline-block;
}

/* Timesheet Generator Specific */
.flex-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

input,
select,
textarea {
    border: 1px solid var(--gray);
    border-radius: 0.5rem;
    padding: 0.5rem;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 0.75rem;
}

input[type="number"] {
    max-width: 5rem;
}

.radio-group {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
}

.radio-group label {
    font-weight: normal;
    margin-bottom: 0;
    cursor: pointer;
    text-align: center;
}

label {
    font-weight: 500;
    margin-bottom: .25rem;
    display: block;
}

.date-picker {
    max-width: 240px;
}

.timesheet-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.timesheet-table th,
.timesheet-table td {
    border: 1px solid var(--gray);
    padding: 0.5rem;
    text-align: center;
    font-size: 0.98rem;
}

.timesheet-table th {
    background: var(--primary);
    color: #fff;
}

.timesheet-table tr.out-of-office {
    background: var(--out);
    color: #991b1b;
    font-style: italic;
}

.out-btn {
    border: none;
    background: #fca5a5;
    color: #991b1b;
    font-weight: bold;
    padding: 0.2rem 0.8rem;
    border-radius: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.out-btn.active {
    background: #991b1b;
    color: #fff;
}

/* Toggle Switch Styling */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin-left: 10px;
    vertical-align: middle;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.toggle-slider {
    background-color: var(--primary);
}

input:checked+.toggle-slider:before {
    transform: translateX(26px);
}

.toggle-container {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.toggle-label {
    margin-right: 10px;
    font-weight: 500;
}

button[type="button"],
.gen-btn {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    padding: 0.7rem 2rem;
    border-radius: 1rem;
    border: none;
    font-size: 1.15rem;
    margin-top: 1.2rem;
    cursor: pointer;
    transition: background 0.18s;
    width: 100%;
    max-width: 320px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 2px 8px #0001;
}

button[type="button"]:hover,
.gen-btn:hover {
    background: #1e40af;
}

.description-component {
    max-width: 800px;
    margin: 0 auto 2rem;
    padding: 0 1rem;
}

.tool-description {
    text-align: center;
    color: #4b5563;
    display: block;
    max-width: 100%;
    margin: 0 auto;
    font-size: 1.15rem;
    line-height: 1.7;
    font-weight: 400;
    background: linear-gradient(135deg, rgba(249, 250, 251, 0.8), rgba(243, 244, 246, 0.8));
    padding: 1.8rem;
    border-radius: 1.2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    border-left: 4px solid var(--primary);
}

.tool-description::before {
    content: "";
    position: absolute;
    top: -10px;
    right: -10px;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(37, 99, 235, 0.05));
    border-radius: 50%;
    z-index: 0;
}

.tool-description::after {
    content: "";
    position: absolute;
    bottom: -20px;
    left: -20px;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(37, 99, 235, 0.03));
    border-radius: 50%;
    z-index: 0;
}

.tool-description p {
    position: relative;
    z-index: 1;
}

@media (max-width: 600px) {
    .tool-description {
        max-width: 95%;
        padding: 1.2rem;
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
}

/* Cookie Consent Banner */
.cookie-consent-banner {
    position: fixed;
    bottom: 20px;
    right: 20px;
    max-width: 380px;
    width: calc(100% - 40px);
    background-color: #fff;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    font-size: 0.9rem;
    line-height: 1.5;
    border-radius: 12px;
    overflow: hidden;
}

.cookie-consent-content {
    padding: 1.2rem;
}

.cookie-consent-banner h2 {
    margin-top: 0;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.cookie-consent-banner p {
    margin-bottom: 0.8rem;
    font-size: 0.85rem;
}

.cookie-consent-options {
    margin-bottom: 1rem;
    border-top: 1px solid var(--gray);
    border-bottom: 1px solid var(--gray);
    padding: 0.6rem 0;
}

.cookie-option {
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
}

.cookie-option input {
    margin-right: 0.4rem;
    width: auto;
    margin-top: 0;
}

.cookie-option label {
    font-weight: 500;
    font-size: 0.85rem;
    margin: 0;
    width: auto;
    display: inline;
}

.cookie-consent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.cookie-consent-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    border: 1px solid var(--gray);
    background-color: #fff;
    transition: all 0.2s;
}

.cookie-consent-btn.primary {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.cookie-consent-btn.secondary {
    color: #64748b;
}

.cookie-consent-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.cookie-consent-footer {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
}

.cookie-consent-footer a {
    color: var(--primary);
    text-decoration: none;
}

.cookie-consent-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .cookie-consent-content {
        padding: 1rem;
    }
    
    .cookie-consent-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .cookie-consent-btn {
        width: 100%;
    }
    
    .cookie-consent-footer {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Footer Styles */
.site-footer {
    background-color: #f1f5f9;
    padding: 1.5rem 0;
    margin-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.footer-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.footer-links {
    margin-bottom: 1rem;
}

.footer-link {
    color: var(--primary);
    text-decoration: none;
    margin: 0 1rem;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.footer-link:hover {
    text-decoration: underline;
}

.footer-copyright {
    color: #64748b;
    font-size: 0.85rem;
}

/* FAQ Section */
.faq-section {
    max-width: 750px;
    margin: 3rem auto 2rem auto;
    padding: 2rem 1.2rem 2.5rem 1.2rem;
    background: #fff;
    border-radius: 1.25rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.faq-section h2 {
    color: var(--primary);
    text-align: center;
    font-size: 2rem;
    margin-bottom: 1.7rem;
    letter-spacing: -1px;
}

.faq-item {
    margin-bottom: 1.6rem;
}

.faq-item h3 {
    color: #1e293b;
    font-size: 1.14rem;
    margin-bottom: 0.4rem;
    border-bottom: none;
    padding-bottom: 0;
}

.faq-item p {
    font-size: 1.07rem;
    line-height: 1.65;
}

.faq-item a {
    color: var(--primary);
}

/* Responsive Styles */
@media (max-width: 600px) {
    .container, .policy-container {
        padding: 1rem 0.8rem;
        margin: 0.8rem auto;
    }
    
    .policy-container {
        padding: 1rem 0.8rem 1.5rem 0.8rem;
    }
    
    .section {
        margin-bottom: 0.5rem;
    }
    
    h1 {
        margin-bottom: 0.3rem;
        font-size: 1.6rem;
    }
    
    .policy-container h1 {
        font-size: 1.6rem;
    }
    
    .policy-container h2 {
        font-size: 1.1rem;
    }
    
    h3 {
        margin-top: 0.4rem;
        margin-bottom: 0.3rem;
    }
    
    .flex-row {
        flex-direction: column !important;
        gap: 0.3rem !important;
        margin-bottom: 0.3rem;
    }
    
    .flex-row > div {
        flex: none !important;
        margin-bottom: 0.3rem;
        width: 100% !important;
    }
    
    .flex-row > div:last-child {
        margin-bottom: 0;
    }
    
    input,
    select,
    textarea {
        margin-bottom: 0.2rem;
        padding: 0.4rem;
        font-size: 0.9rem;
        min-height: 2rem;
        height: auto;
    }
    
    label {
        margin-bottom: 0.1rem;
        font-size: 0.85rem;
        margin-top: 0.1rem;
        display: block;
    }
    
    .toggle-container {
        margin-bottom: 0.3rem;
        margin-top: 0.2rem;
    }
    
    .toggle-label {
        font-size: 0.88rem;
    }
    
    .toggle-switch {
        height: 20px;
        width: 40px;
    }
    
    .toggle-slider:before {
        height: 14px;
        width: 14px;
        left: 3px;
        bottom: 3px;
    }
    
    input:checked+.toggle-slider:before {
        transform: translateX(20px);
    }
    
    .radio-group {
        margin-bottom: 0.6rem;
        gap: 1rem;
        margin-top: 0.3rem;
    }
    
    .radio-group label {
        font-size: 0.88rem;
    }
    
    .timesheet-table th,
    .timesheet-table td {
        font-size: 0.82rem;
        padding: 0.3rem;
    }
    
    .gen-btn {
        margin-top: 1rem;
        padding: 0.7rem 1.3rem;
        font-size: 1.05rem;
    }
    
    #user-form {
        margin-bottom: 1rem;
    }
    
    .date-picker {
        min-height: 2.2rem;
        font-size: 0.95rem;
        height: auto;
    }
    
    .site-footer {
        padding: 1rem 0;
        margin-top: 1rem;
    }
    
    .footer-link {
        margin: 0 0.5rem;
        font-size: 0.85rem;
    }
    
    .footer-copyright {
        font-size: 0.75rem;
    }
}