/* Custom Tooltip Styles - Pure AngularJS Implementation */
.custom-tooltip {
    font-family: "farmerplannerfont", "Helvetica Neue", Helvetica, Arial;
    font-size: 14px;
    line-height: 1.3;
    position: absolute;
    z-index: 9999;
    display: none;
    opacity: 0;
    filter: alpha(opacity=0);
    visibility: visible;
    transition: opacity 0.15s ease-in-out;
    pointer-events: none;
}

.custom-tooltip.in {
    opacity: 0.9;
    filter: alpha(opacity=90);
}

.custom-tooltip.top {
    margin-top: 0px;
    padding: 2px 0;
}

.custom-tooltip.right {
    margin-left: 0px;
    padding: 0 2px;
}

.custom-tooltip.bottom {
    margin-top: 0px;
    padding: 2px 0;
}

.custom-tooltip.left {
    margin-left: 0px;
    padding: 0 2px;
}

.custom-tooltip-inner {
    max-width: 300px;
    padding: 6px 10px;
    color: #ffffff;
    text-align: center;
    background-color: #333333;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    font-weight: normal;
    word-wrap: break-word;
    white-space: normal;
    position: relative;
}

.custom-tooltip-arrow {
    position: absolute;
    width: 0;
    height: 0;
    border-color: transparent;
    border-style: solid;
    border-width: 3px;
}

/* Top placement - arrow points down to element */
.custom-tooltip.top .custom-tooltip-arrow {
    bottom: -3px;
    left: 50%;
    margin-left: -3px;
    border-top-color: #333333;
    border-bottom: none;
    border-left-color: transparent;
    border-right-color: transparent;
}

/* Bottom placement - arrow points up to element */
.custom-tooltip.bottom .custom-tooltip-arrow {
    top: -3px;
    left: 50%;
    margin-left: -3px;
    border-bottom-color: #333333;
    border-top: none;
    border-left-color: transparent;
    border-right-color: transparent;
}

/* Left placement - arrow points right to element */
.custom-tooltip.left .custom-tooltip-arrow {
    top: 50%;
    right: -3px;
    margin-top: -3px;
    border-left-color: #333333;
    border-right: none;
    border-top-color: transparent;
    border-bottom-color: transparent;
}

/* Right placement - arrow points left to element */
.custom-tooltip.right .custom-tooltip-arrow {
    top: 50%;
    left: -3px;
    margin-top: -3px;
    border-right-color: #333333;
    border-left: none;
    border-top-color: transparent;
    border-bottom-color: transparent;
}

/* Custom tooltip themes with matching arrows */
.custom-tooltip-theme-info .custom-tooltip-inner {
    background-color: #31708f;
    color: #ffffff;
}

.custom-tooltip-theme-info.top .custom-tooltip-arrow {
    border-top-color: #31708f;
}

.custom-tooltip-theme-info.bottom .custom-tooltip-arrow {
    border-bottom-color: #31708f;
}

.custom-tooltip-theme-info.left .custom-tooltip-arrow {
    border-left-color: #31708f;
}

.custom-tooltip-theme-info.right .custom-tooltip-arrow {
    border-right-color: #31708f;
}

.custom-tooltip-theme-success .custom-tooltip-inner {
    background-color: #3c763d;
    color: #ffffff;
}

.custom-tooltip-theme-success.top .custom-tooltip-arrow {
    border-top-color: #3c763d;
}

.custom-tooltip-theme-success.bottom .custom-tooltip-arrow {
    border-bottom-color: #3c763d;
}

.custom-tooltip-theme-success.left .custom-tooltip-arrow {
    border-left-color: #3c763d;
}

.custom-tooltip-theme-success.right .custom-tooltip-arrow {
    border-right-color: #3c763d;
}

.custom-tooltip-theme-warning .custom-tooltip-inner {
    background-color: #8a6d3b;
    color: #ffffff;
}

.custom-tooltip-theme-warning.top .custom-tooltip-arrow {
    border-top-color: #8a6d3b;
}

.custom-tooltip-theme-warning.bottom .custom-tooltip-arrow {
    border-bottom-color: #8a6d3b;
}

.custom-tooltip-theme-warning.left .custom-tooltip-arrow {
    border-left-color: #8a6d3b;
}

.custom-tooltip-theme-warning.right .custom-tooltip-arrow {
    border-right-color: #8a6d3b;
}

.custom-tooltip-theme-danger .custom-tooltip-inner {
    background-color: #a94442;
    color: #ffffff;
}

.custom-tooltip-theme-danger.top .custom-tooltip-arrow {
    border-top-color: #a94442;
}

.custom-tooltip-theme-danger.bottom .custom-tooltip-arrow {
    border-bottom-color: #a94442;
}

.custom-tooltip-theme-danger.left .custom-tooltip-arrow {
    border-left-color: #a94442;
}

.custom-tooltip-theme-danger.right .custom-tooltip-arrow {
    border-right-color: #a94442;
}

/* Animation classes */
.custom-tooltip.fade {
    opacity: 0;
    transition: opacity 0.15s linear;
}

.custom-tooltip.fade.in {
    opacity: 0.9;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .custom-tooltip-inner {
        max-width: 250px;
        padding: 5px 8px;
        font-size: 10px;
        white-space: normal;
    }
    
    .custom-tooltip-arrow {
        border-width: 2px;
    }
    
    .custom-tooltip.top .custom-tooltip-arrow {
        bottom: -2px;
        margin-left: -2px;
    }
    
    .custom-tooltip.bottom .custom-tooltip-arrow {
        top: -2px;
        margin-left: -2px;
    }
    
    .custom-tooltip.left .custom-tooltip-arrow {
        right: -2px;
        margin-top: -2px;
    }
    
    .custom-tooltip.right .custom-tooltip-arrow {
        left: -2px;
        margin-top: -2px;
    }
}

/* Checkbox container styling to prevent layout issues */
.checkbox-container {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    overflow: hidden;
    contain: layout;
}

.checkbox-container .css-checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: auto;
}

.checkbox-container .css-label {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    cursor: pointer;
    margin: 0;
    padding: 0;
}

/* UI-Select validation styling */
/*.has-error .ui-select-container {
    border: 1px solid #FFA0A0 !important;
    border-radius: 4px;
}

    .has-error .ui-select-container .ui-select-match,
    .has-error .ui-select-container .ui-select-search {
        border-color: #FFA0A0 !important;
    }

    .has-error .ui-select-container.open {
        border-color: #FFA0A0 !important;
    }*/

/* Ensure the dropdown itself is not affected */
/*.has-error .ui-select-choices {
    border-color: #ccc !important;
}

.has-error .ui-select-choices-row {
    border: none !important;
}*/