/**
 * Public styles for Hiring Tracker plugin
 * Version: 1.0.0
 * 
 * These styles complement the UIKit framework already loaded by the theme
 */

/* ========================================
   UIKit Select Dropdown Arrow Override
   ======================================== */
/* Ensure UIKit select styling with single large dropdown arrow - force override browser defaults */
.uk-select {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3e%3cpolyline fill='none' stroke='%23666' stroke-width='1.5' points='5 7 10 12 15 7'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: calc(100% - 10px) 50% !important;
    background-size: 20px 20px !important;
    padding-right: 40px !important;
}

/* DEA Reveal Functionality Styles */
.ht-dea-masked {
    color: #1e87f0;
    transition: color 0.2s ease;
}

.ht-dea-masked:hover {
    color: #0f6ecd;
}

.ht-dea-revealed {
    font-weight: bold;
    color: #333;
}

/* Custom styles for hiring tracker components */
.ht-dashboard {
    margin-top: 20px;
}

.ht-stage-card {
    transition: transform 0.2s ease-in-out;
}

.ht-stage-card:hover {
    transform: translateY(-2px);
}

/* Status indicators */
.ht-status-pending {
    color: #f0506e;
}

.ht-status-in-progress {
    color: #faa05a;
}

.ht-status-completed {
    color: #32d296;
}

/* Progress bar enhancements */
.ht-progress-bar {
    position: relative;
    overflow: visible;
}

.ht-progress-bar .uk-progress-bar {
    transition: width 0.6s ease;
}

/* Task Notes Styles */
.task-notes-section {
    border-top: 1px solid #e5e5e5;
    padding-top: 10px;
}

.task-note {
    background: #f8f8f8 !important;
    border: 1px solid #e5e5e5;
    border-left: 3px solid #1e87f0;
    color: #333 !important;
}

.task-note .uk-card-body {
    padding: 8px 12px !important;
    color: #333 !important;
}

.task-note .uk-text-small,
.task-note .uk-text-meta {
    color: #666 !important;
}

.task-notes-container .uk-badge-notification {
    font-size: 10px;
    min-width: 18px;
    height: 18px;
    line-height: 16px;
}

.toggle-notes {
    font-size: 12px;
    text-decoration: underline;
}

.toggle-notes:hover {
    text-decoration: none;
}

/* Note Editor Styles */
.note-editor {
    outline: none;
    background: #fff;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
}

.note-editor:focus {
    border-color: #1e87f0;
    box-shadow: 0 0 0 1px rgba(30, 135, 240, 0.3);
}

.note-editor:empty:before {
    content: attr(placeholder);
    color: #999;
    font-style: italic;
}

.note-toolbar {
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 8px;
}

.note-toolbar .uk-button-group .uk-button {
    min-width: 35px;
    font-size: 12px;
    padding: 0 8px;
}

.note-toolbar .uk-button:hover {
    background: #1e87f0;
    color: white;
}

/* Modal Enhancements */
#task-note-modal .uk-modal-dialog {
    width: 600px;
    max-width: 90vw;
}

#task-note-modal .uk-modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

/* Rich text content styling */
.task-note strong, .note-editor strong {
    font-weight: bold;
}

.task-note em, .note-editor em {
    font-style: italic;
}

.task-note ul, .note-editor ul {
    list-style: disc;
    margin-left: 20px;
    margin-bottom: 10px;
}

.task-note ol, .note-editor ol {
    list-style: decimal;
    margin-left: 20px;
    margin-bottom: 10px;
}

.task-note li, .note-editor li {
    margin-bottom: 4px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .task-notes-section {
        padding: 8px 0;
    }
    
    .task-note .uk-card-body {
        padding: 6px 8px !important;
    }
    
    .note-toolbar .uk-button-group .uk-button {
        min-width: 30px;
        padding: 0 6px;
        font-size: 11px;
    }
    
    #task-note-modal .uk-modal-dialog {
        width: 95vw;
        margin: 20px auto;
    }
    
    .note-editor {
        min-height: 100px;
        font-size: 13px;
    }
}

/* Old task modal styles removed - now using unified modal system */

/* Note Indicator on Task Status Icons */
.task-status-indicator .status-icon-container {
    position: relative;
    display: inline-block;
}

.task-status-indicator .note-indicator {
    position: absolute;
    top: -4px;
    right: -12px;
    background: #ff3b30;
    color: white;
    font-size: 10px;
    font-weight: bold;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    padding: 0;
    z-index: 10;
}

.task-status-indicator.has-notes {
    cursor: pointer;
}

.task-status-indicator.has-notes:hover .status-icon {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

/* Old scrollbar and responsive styles for task modal removed */

/* Responsive adjustments for note indicators */
@media (max-width: 768px) {
    .task-status-indicator .note-indicator {
        width: 20px !important;
        height: 20px !important;
        font-size: 9px !important;
        border-radius: 50% !important;
        top: -3px !important;
        right: -10px !important;
        border: none !important;
        padding: 0 !important;
    }
}

/* Gantt Chart Styles */
.ht-gantt-chart {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ht-gantt-wrapper {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ht-gantt-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid #dee2e6;
    border-radius: 8px 8px 0 0;
}

.ht-gantt-task-bar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
}

.ht-gantt-task-bar:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transform: translateY(-1px);
}

.ht-gantt-task-text {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Task colors with better contrast */
.gantt-task-bg-check {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.gantt-task-ref-check {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.gantt-task-doc-review {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

.gantt-task-interview {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
}

.gantt-task-credential {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
}

.gantt-task-approval {
    background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%);
}

/* Legend improvements */
.ht-legend-color {
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Mobile responsive improvements */
@media (max-width: 768px) {
    .ht-gantt-wrapper {
        border-radius: 4px;
    }
    
    .ht-gantt-task-text {
        font-size: 9px;
    }
}

/* Timeline styles for applicant view */
.ht-timeline {
    position: relative;
    padding-left: 30px;
}

.ht-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e5e5e5;
}

.ht-timeline-item {
    position: relative;
    padding-bottom: 30px;
}

.ht-timeline-item::before {
    content: '';
    position: absolute;
    left: -34px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #999;
    border: 2px solid #fff;
}

.ht-timeline-item.completed::before {
    background: #32d296;
}

.ht-timeline-item.in_progress::before {
    background: #1e87f0;
    box-shadow: 0 0 0 3px rgba(30, 135, 240, 0.2);
}

.ht-timeline-item.active::before {
    background: #1e87f0;
    box-shadow: 0 0 0 3px rgba(30, 135, 240, 0.2);
}

/* Stage item filtering */
.ht-stage-item {
    transition: opacity 0.3s ease;
}

.ht-stage-item[style*="display: none"] {
    opacity: 0;
}

/* Medical Group selector styling */
.ht-medical-group-selector {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
    border: 1px solid #e5e5e5;
}

.ht-medical-group-selector label {
    font-weight: 600;
    margin-right: 10px;
}

/* Applicant management specific styles */
.ht-applicant-form fieldset {
    border: 1px solid #e5e5e5;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 20px;
}

.ht-applicant-form legend {
    font-weight: 600;
    padding: 0 10px;
    margin-bottom: 15px;
}

.ht-applicant-card {
    transition: transform 0.2s ease-in-out;
}

.ht-applicant-card:hover {
    transform: translateY(-2px);
}

.ht-applicant-card .uk-card-title a {
    color: inherit;
    text-decoration: none;
}

.ht-applicant-card .uk-card-title a:hover {
    color: #1e87f0;
}

.ht-status-badge .uk-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}



.ht-medical-group-selector select {
    min-width: 200px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
}

/* Enhanced card styling */
.ht-dashboard .uk-card {
    border: 1px solid #e5e5e5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ht-dashboard .uk-card-hover:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Dashboard stat cards consistent height */
.ht-dashboard .uk-card-body.uk-text-center {
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* Ensure labels/badges are positioned consistently */
.ht-dashboard .uk-card-body.uk-text-center .uk-label,
.ht-dashboard .uk-card-body.uk-text-center .uk-card-badge {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
}

/* Adjust card content spacing for consistent layout */
.ht-dashboard .uk-card-body.uk-text-center .uk-card-title {
    margin-top: 20px;
}

/* Small cards get slightly smaller min-height */
.ht-dashboard .uk-card-small.uk-card-body.uk-text-center {
    min-height: 100px;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .ht-timeline {
        padding-left: 20px;
    }
    
    .ht-timeline-item::before {
        left: -24px;
    }
    
    .ht-medical-group-selector {
        text-align: center;
    }
    
    .ht-medical-group-selector label {
        display: block;
        margin-bottom: 10px;
    }
    
    .ht-medical-group-selector select {
        width: 100%;
    }
}

/* Alert enhancements */
.uk-alert {
    border-left: 4px solid;
}

.uk-alert-primary {
    border-left-color: #1e87f0;
}

.uk-alert-success {
    border-left-color: #32d296;
}

.uk-alert-warning {
    border-left-color: #faa05a;
}

.uk-alert-danger {
    border-left-color: #f0506e;
}

/* Table enhancements */
.uk-table th {
    font-weight: 600;
    color: #333;
}

.uk-table-hover tbody tr:hover {
    background-color: #f8f9fa;
}

/* Badge enhancements */
.uk-badge {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 12px;
}

/* Button group spacing */
.uk-button-group .uk-button {
    margin-right: 0;
}

.uk-button-group .uk-button:not(:last-child) {
    margin-right: 1px;
}

/* Hide Microsoft Edge password reveal button for all password fields */
input[type="password"].ht-password-field::-ms-reveal,
input[type="password"].ht-password-field::-ms-clear {
    display: none !important;
}

/* Also hide for all password fields in login forms to prevent Edge's duplicate icon */
input[type="password"]#user_pass::-ms-reveal,
input[type="password"]#user_pass::-ms-clear,
input[type="password"]#user_pass_standalone::-ms-reveal,
input[type="password"]#user_pass_standalone::-ms-clear,
input[type="password"]#pass1::-ms-reveal,
input[type="password"]#pass1::-ms-clear,
input[type="password"]#pass2::-ms-reveal,
input[type="password"]#pass2::-ms-clear,
input[type="password"]#pass1_standalone::-ms-reveal,
input[type="password"]#pass1_standalone::-ms-clear,
input[type="password"]#pass2_standalone::-ms-reveal,
input[type="password"]#pass2_standalone::-ms-clear {
    display: none !important;
} 