﻿#instellingen-form .uniform-input {
    height: 38px;
    width: 100%;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    padding: 0.375rem 0.75rem;
}

/* Fix for select dropdown text alignment */
select.uniform-input,
select.form-control {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    line-height: 1.2;
}

#instellingen-form .uniform-label {
    text-align: left;
    font-weight: 600;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
    display: block;
    margin-bottom: 5px;
    width: 100%;
    padding: 0;
    margin-right: 0;
}

#instellingen-form .form-group {
    margin-bottom: 1rem;
}

    /* Change form groups to vertical layout to prevent label text overlap */
    #instellingen-form .form-group.d-flex {
        display: block !important;
        margin-bottom: 1.5rem;
    }

        /* Ensure input fields take full width in vertical layout */
        #instellingen-form .form-group.d-flex .uniform-input,
        #instellingen-form .form-group.d-flex .form-control {
            width: 100%;
            margin-top: 5px;
        }

/* Additional styling for labels to prevent text overlap */

#instellingen-form .form-control {
    height: 38px;
    width: 100%;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
}

/* Ensure all form controls across all tabs have thin borders */
.form-control,
.uniform-input,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="password"],
select,
textarea {
    border: 1px solid #ced4da !important;
    border-radius: 0.25rem;
}

    /* Override any Bootstrap thick borders */
    .form-control:focus,
    .uniform-input:focus {
        border: 1px solid #80bdff !important;
        box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    }

/* Tab Navigation Styles */
.client-tabs {
    display: flex;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 1rem;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
    padding: 0;
    overflow-x: auto;
}

.client-tab {
    background: transparent;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    margin-right: 2px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
    color: #6c757d;
    font-size: 14px;
}

    .client-tab:hover {
        background: #e9ecef;
        color: #495057;
    }

    .client-tab.active {
        background: white;
        color: #007bff;
        border-bottom: 2px solid #007bff;
        font-weight: 600;
    }

.tab-content {
    min-height: 500px;
    padding: 0;
}

.tab-pane {
    display: none;
}

    .tab-pane.active {
        display: block;
    }

/* Custom Tooltip Styles */
.tooltip-container {
    position: relative;
}

    .tooltip-container .tooltip-text {
        visibility: hidden;
        opacity: 0;
        background-color: #333;
        color: white;
        text-align: center;
        border-radius: 8px;
        padding: 12px 16px;
        position: absolute;
        z-index: 1000;
        bottom: 125%;
        left: 60px;
        transform: translateX(-50%);
        font-size: 14px;
        font-weight: 400;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
        width: 400px;
        white-space: normal;
        line-height: 1.4;
    }

        .tooltip-container .tooltip-text::after {
            content: "";
            position: absolute;
            top: 100%;
            left: 50%;
            margin-left: -5px;
            border-width: 5px;
            border-style: solid;
            border-color: #333 transparent transparent transparent;
        }

    .tooltip-container:hover .tooltip-text {
        visibility: visible;
        opacity: 1;
        transition-delay: 0s;
    }

/* Responsive adjustments */
@media (max-width: 768px) {
    #instellingen-form .uniform-label {
        text-align: left;
        margin-right: 0;
        width: 100%; /* Ensure label takes full width on smaller screens */
    }

    #instellingen-form .uniform-input {
        width: 100%; /* Ensure input takes full width on smaller screens */
    }

    .tooltip-container .tooltip-text {
        max-width: 250px;
        font-size: 13px;
    }

    .client-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .client-tab {
        flex-shrink: 0;
        min-width: 120px;
        padding: 10px 16px;
        font-size: 13px;
    }
}

.instellingen-wrapper {
    background: #fff;
    padding: 20px;
}

/* Modal overrides */
.modal-content {
    max-width: 900px !important;
}

/* Additional styling improvements - Added by Dinand */
.form-group label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

/* Enhanced button styles */
.btn-primary {
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

/* Google Drive Modal Styles */
.modal-background-front {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.drive-modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.drive-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.drive-header-left {
    display: flex;
    align-items: center;
}

.drive-icon {
    color: #007bff;
    margin-right: 12px;
    font-size: 20px;
}

.drive-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.drive-close-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #6c757d;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.drive-close-btn:hover {
    background: #e9ecef;
    color: #333;
}

.drive-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.drive-breadcrumb {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    flex-wrap: wrap;
}

.breadcrumb-item {
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 14px;
}

.breadcrumb-item:hover {
    background: #e9ecef;
}

.breadcrumb-separator {
    margin: 0 8px;
    color: #6c757d;
}

.drive-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 6px;
    flex-wrap: wrap;
    gap: 12px;
}

.toolbar-left,
.toolbar-right {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.drive-btn {
    padding: 8px 16px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.drive-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.drive-btn-primary {
    background: #007bff;
    border-color: #007bff;
    color: white;
}

.drive-btn-primary:hover {
    background: #0056b3;
    border-color: #0056b3;
}

.drive-btn-secondary {
    background: #6c757d;
    border-color: #6c757d;
    color: white;
}

.drive-btn-secondary:hover {
    background: #545b62;
    border-color: #545b62;
}

.drive-btn-info {
    background: #17a2b8;
    border-color: #17a2b8;
    color: white;
}

.drive-btn-info:hover {
    background: #117a8b;
    border-color: #117a8b;
}

.drive-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Drive Items Grid Styles */
.drive-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    padding: 20px;
}

.drive-item {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.drive-item:hover {
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
    transform: translateY(-2px);
}

.drive-item.selected {
    border-color: #007bff;
    background-color: #f8f9ff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.item-select {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
}

.item-select input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.item-icon {
    text-align: center;
    margin-bottom: 12px;
}

.folder-icon {
    color: #007bff;
    font-size: 48px;
}

.file-icon {
    color: #6c757d;
    font-size: 48px;
}

.item-details {
    text-align: center;
}

.item-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    word-break: break-word;
}

.item-meta {
    font-size: 12px;
    color: #6c757d;
}

.item-type {
    font-weight: 500;
}

.item-size,
.item-modified {
    opacity: 0.8;
}

.item-actions {
    margin-top: 12px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.action-btn {
    background: none;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 6px 10px;
    cursor: pointer;
    color: #6c757d;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
    color: #495057;
}

.drive-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-icon {
    font-size: 80px;
    color: #dee2e6;
    margin-bottom: 20px;
}

.drive-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    gap: 12px;
    color: #6c757d;
    font-size: 16px;
}

.drive-form-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.drive-form {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.form-header h6 {
    margin: 0;
    font-weight: 600;
    color: #333;
}

.form-close-btn {
    background: none;
    border: none;
    font-size: 16px;
    color: #6c757d;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.form-close-btn:hover {
    background: #e9ecef;
    color: #333;
}

.form-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.form-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 20px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
}

.upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.upload-area:hover {
    border-color: #007bff;
    background-color: #f8f9ff;
}

.upload-icon {
    font-size: 48px;
    color: #dee2e6;
    margin-bottom: 16px;
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-progress {
    margin-top: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 8px;
    position: relative;
}

/* Responsive adjustments for modal */
@media (max-width: 768px) {
    .modal-background-front {
        padding: 10px;
    }
    
    .drive-modal-content {
        max-height: 95vh;
    }
    
    .drive-modal-header {
        padding: 16px 20px;
    }
    
    .drive-modal-body {
        padding: 20px;
    }
    
    .drive-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .toolbar-left,
    .toolbar-right {
        justify-content: center;
    }
    
    .drive-items-grid {
        grid-template-columns: 1fr;
        padding: 16px;
    }
    
    .drive-form {
        width: 95%;
        max-height: 90vh;
    }
}

/* Mandatory Field Validation Styles */
.mandatory-field-empty {
    border: 2px solid #dc3545 !important;
    background-color: #fff5f5 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.mandatory-field-empty:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.tab-missing-count {
    background: #dc3545;
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 6px;
    min-width: 18px;
    text-align: center;
    display: inline-block;
}

.client-tab .tab-missing-count {
    background: #dc3545;
}

.client-tab.active .tab-missing-count {
    background: #dc3545;
}