/* ===============================================================
   Koper & Greep - Google Material Design Inspired Theme
   =============================================================== */

/* --- Base & Typography --- */
body { 
    font-family: 'Roboto', sans-serif; 
    background-color: #f5f5f5;
}

/* --- Buttons --- */
.material-button, .material-button-outlined, .material-button-danger, .material-button-success {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 14px;
    padding: 0 16px;
    height: 36px;
    border-radius: 4px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s, border-color 0.2s;
    text-transform: capitalize;
}
.material-button {
    background-color: #1a73e8;
    color: white;
}
.material-button:hover { background-color: #287ae6; box-shadow: 0 1px 3px 1px rgba(0,0,0,0.15); }
.material-button:disabled { background-color: #e0e0e0; color: #9e9e9e; cursor: not-allowed; }

.material-button-outlined {
    background-color: white;
    color: #1a73e8;
    border-color: #dadce0;
}
.material-button-outlined:hover { background-color: rgba(26, 115, 232, 0.05); border-color: #d2e3fc; }

.material-button-danger { background-color: #d93025; color: white; }
.material-button-danger:hover { background-color: #e04940; box-shadow: 0 1px 3px 1px rgba(0,0,0,0.15); }
.material-button-danger:disabled { background-color: #f7b2ad; cursor: not-allowed; }

.material-button-success { background-color: #1e8e3e; color: white; }
.material-button-success:hover { background-color: #2e974a; box-shadow: 0 1px 3px 1px rgba(0,0,0,0.15); }
.material-button-success:disabled { background-color: #a5d6b4; cursor: not-allowed; }


/* --- Form Inputs & Selects --- */
.material-select, .material-input {
    width: 100%;
    min-width: 200px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 14px;
    background-color: white;
    transition: border-color 0.2s;
}
.material-select:focus, .material-input:focus {
    outline: none;
    border: 2px solid #1a73e8;
    padding: 0 11px; /* Compensate for border */
}
.material-select:disabled { background-color: #f5f5f5; color: #bdbdbd; }
.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #5f6368;
    margin-bottom: 6px;
}

/* --- Tabs --- */
.tab-button { 
    padding: 0.75rem 1.25rem; 
    cursor: pointer; 
    border-bottom: 3px solid transparent; 
    font-weight: 500; 
    color: #5f6368; 
    background: transparent; 
    transition: 0.15s; 
}
.tab-button:hover {
    background-color: #f1f3f4;
}
.tab-button.active { 
    color: #1967d2; 
    border-bottom-color: #1967d2;
}

/* --- Modals & Loaders --- */
.modal-backdrop { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.5); align-items: center; justify-content: center; }
.modal-content { background-color: #fff; padding: 2rem; border-radius: 8px; box-shadow: 0 4px 25px -5px rgba(0, 0, 0, 0.2); width: 90%; max-width: 500px; }
.loader { border: 4px solid #f3f3f3; border-top: 4px solid #1a73e8; border-radius: 50%; width: 40px; height: 40px; animation: spin 1s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* --- Tables --- */
.table-small { border-spacing: 0; }
.table-small th { 
    background: #f8f9fa; 
    color: #5f6368; 
    font-weight: 500; 
    text-transform: none; 
    letter-spacing: 0; 
    font-size: 13px;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid #dadce0;
}
.table-small td {
    padding: 0.6rem 1rem;
    font-size: 14px;
    border-bottom: 1px solid #e0e0e0;
}
.table-small tr:last-child td { border-bottom: none; }
.table-small tr:hover { background: #f7f7f7; }

/* --- Visualizations (DNA, Progress, etc.) --- */
.dna-strand { display: flex; height: 30px; border-radius: 4px; overflow: hidden; margin-bottom: 7px; background-color: #e8eaed; width: 100%; }
.dna-segment { position: relative; float: left; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 500; font-size: 0.9rem; white-space: nowrap; border-right: 1px solid rgba(255,255,255,0.3); height:100%; transition: width 0.3s ease-in-out; }
.dna-segment .tooltip-text { display: none; position: absolute; bottom: 110%; left: 50%; transform: translateX(-50%); background-color: #3c4043; color: #fff; padding: 4px 8px; border-radius: 4px; font-size: 0.8rem; white-space: nowrap; z-index: 10; }
.dna-segment:hover .tooltip-text { display: block; }

.verspillingsbalk { height: 26px; border-radius: 4px; margin-bottom: 8px; display: flex; align-items: center; overflow: hidden; background: #e8eaed; font-weight:500; }
.verspilling-segment { height: 100%; font-size: 0.8em; display: flex; align-items: center; justify-content: center; color:white; transition: width 0.3s ease-in-out; text-shadow: 1px 1px 2px rgba(0,0,0,0.3); }

.progress-bar-container { background-color: #e8eaed; border-radius: 9999px; overflow: hidden; height: 1.5rem; box-shadow: inset 0 1px 2px 0 rgba(0,0,0,0.1); }
.progress-bar { height: 100%; display: flex; align-items: center; justify-content: center; color: white; font-weight: 500; transition: width 0.5s ease-in-out, background-color 0.5s ease-in-out; font-size: 0.9rem; }
.low-alignment { background-color: #d93025; }
.medium-alignment { background-color: #f9ab00; }
.high-alignment { background-color: #1e8e3e; }

/* --- Other specific elements --- */
.legend { font-size: 0.85rem; color: #5f6368; background-color: #f8f9fa; padding: 1rem; border-radius: 8px; margin-top: 1.5rem; border: 1px solid #dadce0; }
.legend h4 { font-weight: 500; margin-bottom: 0.5rem; color: #202124; font-size: 1.1em; }
.draggable-row { cursor: grab; }
.dragging { opacity: 0.5; background: #d2e3fc; }
.drag-over { outline: 2px dashed #1a73e8; }
.highlight { background-color: #e8f0fe !important; }

/* --- Input Ranges --- */
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; background: #bdc1c6; border-radius: 5px; outline: none; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 16px; height: 16px; background: #1a73e8; border-radius: 50%; cursor: pointer; }

/* ===============================================================
   Responsive & Mobiele Aanpassingen
   =============================================================== */

/* Standaard voor kleine schermen (mobiel) */
main {
    padding: 0.75rem; /* 12px padding op mobiel */
}

/* Regels voor schermen groter dan 768px (tablets en desktops) */
@media (min-width: 768px) {
    main {
        padding: 1.5rem; /* 24px padding op grotere schermen */
    }
}

/* Verklein de basis lettergrootte op zeer kleine schermen */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    h1 {
        font-size: 1.25rem; /* ~20px */
    }

    h2 {
        font-size: 1.1rem; /* ~18px */
    }
}