/* Modern DAS-inspired styles */
body, html {
    background: #fff !important; /* White background for a clean look */
    color: #012745; /* Blauw 800 */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    height: auto;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
}

header {
    background: #fcf7f1 !important; /* Beige */
    color: #94c7ed !important; /* DAS dark blue for contrast */
    text-align: center;
    padding: 6px 0 !important;
    font-size: 1.1rem !important;
    font-weight: bold;
    text-shadow: none;
    height: 38px !important;
    min-height: 38px !important;
    box-sizing: border-box;
    box-shadow: 0 6px 32px 0 rgba(2, 98, 172, 0.18), 0 3px 12px 0 rgba(1, 39, 69, 0.13);
    /* Bigger, softer shadow for depth */
}

header h1 {
    font-size: 1.2rem !important;
    margin: 0;
    font-weight: bold;
    color: inherit !important;
}

/* Ensure the header background color is explicitly set */
header.bg-primary {
    background-color: #0262AC !important; /* Blauw 500 */
    height: 28px !important;
    min-height: 28px !important;
    padding: 0 0 !important;
    font-size: 1rem !important;
}

/* Sidebar styles */
.sidebar {
    background: #0262AC;
    width: 70px;
    position: fixed;
    top: 0;
    left: 0;
    min-height: 100vh;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 32px;
    z-index: 1000;
    box-shadow: 2px 0 8px rgba(0,0,0,0.07);
    margin-top: 0;
}

.sidebar-icons {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.sidebar-icons li {
    display: flex;
    justify-content: center;
    align-items: center;
}

.sidebar-icons img {
    width: 32px;
    height: 32px;
    filter: invert(1);
    opacity: 1;
    transition: opacity 0.2s, transform 0.2s;
    cursor: pointer;
}

/* Prevent hover and pointer for DAS logo */
.sidebar-icons img.das-logo {
    width: 48px !important;
    height: 48px !important;
    filter: brightness(0) invert(1) !important;
    opacity: 1 !important;
    cursor: default !important;
    pointer-events: none !important;
    transition: none !important;
    background: none !important;
    display: block;
    margin: 0 auto;
}

.sidebar-icons a img,
.sidebar-icons a svg {
    transition: opacity 0.2s, transform 0.2s;
    opacity: 1;
}

.sidebar-icons img:not(.das-logo):hover,
.sidebar-icons a img:hover,
.sidebar-icons a svg:hover {
    opacity: 1;
    transform: scale(1.3);
}

/* New: Layout for header + sidebar + main */
.layout-row {
    display: flex;
    flex-direction: row;
    width: 100%;
    align-items: stretch;
    min-height: 100vh;
    height: 100vh;
}

/* Ensure the left and right sections are always 50/50 divided */
main {
    display: flex;
    flex-direction: row;
    gap: 0;
    padding: 0;
    height: 100vh;
    min-height: 0;
    margin-left: 70px; /* Add margin to avoid overlap with fixed sidebar */
    width: calc(100% - 70px);
}

#costar-form-section, #output-section, #care-form-section, #ape-form-section, #tag-form-section, .bg-light {
    /* Remove fixed max-width and overflow hidden if present */
    flex: 1 1 50%;
    width: 50%;
    background: #fff !important; /* White background for sections */
    padding: 20px;
    border-radius: 0 !important;
    box-shadow: none;
    border: none;
    height: 100vh;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

#output, #role-task-output, #care-output, #ape-output, #tag-output {
    min-height: 400px;
    max-height: calc(100vh - 350px); /* 220px leaves room for buttons and padding, adjust as needed */
    height: auto;
    padding: 20px;
    border: 1px solid #0262AC; /* Blauw 500 */
    border-radius: 12px !important;
    background-color: #fff !important; /* White background for output boxes */
    color: #012745;
    overflow-y: auto;
    white-space: pre-line;
    box-shadow: none;
    width: 100%;
    display: block;
    flex: 0 0 auto;
}

button, .btn-primary, .btn-secondary {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    background-color: #0262AC !important; /* Blauw 500 */
    border-color: #0262AC !important; /* Match border color */
    color: #fcf7f1;
    border: none;
    border-radius: 12px !important;
    cursor: pointer;
    transition: background-color 0.8s cubic-bezier(0.4,0,0.2,1), border-color 0.8s cubic-bezier(0.4,0,0.2,1), color 0.3s;
}

button:hover, .btn-secondary:hover {
    background-color: #024e8a; /* Blauw 600 */
    transform: scale(1.05);
}

/* Force the example buttons to have the exact color #e94f62 */
.example-buttons .btn-secondary {
    background-color: #e94f62 !important; /* Exact color */
    border-color: #e94f62 !important;
    color: white !important;
    border-radius: 12px !important;
    transition: background 0.3s, transform 0.2s;
}

.example-buttons .btn-secondary:hover {
    background-color: #f06273 !important; /* Slightly lighter shade for hover */
    border-color: #f06273 !important;
    transform: scale(1.05);
}

a.btn-secondary.copy-copilot-gradient {
    background: linear-gradient(90deg, #0262AC 0%, #e94f62 100%) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(2,98,172,0.08);
    transition: background 0.3s, transform 0.2s;
}
a.btn-secondary.copy-copilot-gradient:hover {
    background: linear-gradient(90deg, #024e8a 0%, #f06273 100%) !important;
    color: #fff !important;
    transform: scale(1.05);
}

button#copy-button {
    transition: background 0.3s, transform 0.2s;
}
button#copy-button:hover {
    background-color: #024e8a !important;
    transform: scale(1.05);
}

button.btn-secondary.copied-feedback {
    background-color: #43e97b !important; /* Solid green for smooth transition */
    color: #fff !important;
    border-color: #43e97b !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Removed the disabled selector for feedback, as it is no longer needed */

textarea {
    width: 100%;
    height: 100px; /* Reduce height from 120px to 80px */
    padding: 10px;
    font-size: 16px;
    font-family: 'Poppins', sans-serif !important; /* Fancy modern sans-serif font */
    border: 1px solid #cccccc; /* Grijs */
    border-radius: 0 !important;
    resize: vertical;
    background-color: #fff !important; /* White background for textareas */
    color: #012745 !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Apply the same fancy modern sans-serif font to labels above textboxes */
label {
    font-family: 'Poppins', sans-serif !important; /* Match textbox font */
    font-size: 1.1rem;
    font-weight: bold;
    color: #0262AC; /* Blauw 500 */
}

.form-control {
    background-color: #fff !important; /* White for all textareas/inputs */
    color: #012745 !important;
    box-shadow: none !important;
    border: 1px solid #cccccc;
    border-radius: 12px !important;
}

#output, #role-task-output, .form-control {
    /* Remove white background from inside the box as well */
    background-image: none !important;
}

.help-balloon {
    position: fixed;
    top: 32px;
    left: 32px;
    z-index: 2000;
    background: #0262AC;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    box-shadow: 0 2px 8px rgba(2,98,172,0.18);
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.help-balloon:hover {
    background: #01447a;
}

.help-popup {
    position: fixed;
    left: 90px;
    top: 32px;
    z-index: 2100;
    background: #e0f0ff;
    color: #012745;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(2, 98, 172, 0.64);
    padding: 28px 32px 24px 32px;
    max-width: 700px;
    min-width: 340px;
    font-size: 1.00rem;
    line-height: 1.6;
    display: none;
    max-height: calc(100vh - 48px - 32px - 32px); /* never below screen, 48px btn + 32px margin top + 32px margin bottom */
    overflow-y: auto;
    overflow-x: auto;
}

.help-popup-content {
    position: relative;
}

.help-popup-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 1.5em;
    color: #0262AC;
    cursor: pointer;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    header {
        height: 32px;
        min-height: 32px;
        padding: 4px 0;
        font-size: 0.9rem;
    }
    .layout-row {
        height: calc(100vh - 60px);
    }
    .sidebar {
        width: 50px;
        min-height: 100vh;
        height: 100vh;
        padding-top: 20px;
    }
    .sidebar-icons img {
        width: 24px;
        height: 24px;
    }
    main {
        margin-left: 50px;
    }
    .help-popup {
        left: 54px;
        top: 12px;
        max-width: 98vw;
        min-width: 0;
        padding: 18px 8px 16px 12px;
        max-height: calc(100vh - 24px);
    }
}

@media (max-width: 600px) {
    .help-balloon { left: 12px; top: 12px; width: 40px; height: 40px; font-size: 1.2em; }
    .help-popup { left: 8px; top: 60px; max-width: 98vw; min-width: 0; padding: 18px 8px 16px 12px; }
}