/* Key Result Dropdown Styles - Tailwind CSS with !important to override swot-min.css */

.key-result-dropdown {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    background: white !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
    z-index: 50 !important;
    min-width: 18rem !important;
    padding: 0.5rem 0 !important;
    display: none !important;
}

.dropdown-item {
    padding: 0.625rem 1rem !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    font-size: 0.875rem !important;
    font-weight: 400 !important;
    color: #374151 !important;
    transition: all 0.15s ease !important;
    position: relative !important;
}

.dropdown-item:hover {
    background-color: #f9fafb !important;
    color: #111827 !important;
}

.icon-container {
    width: 1rem !important;
    height: 1rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-right: 0.5rem !important;
}


/* Status color options */
.status-color-options {
    display: flex !important;
    gap: 0.5rem !important;
    align-items: center !important;
    margin-left: 0.75rem !important;
}

.color-option {
    width: 0.875rem !important;
    height: 0.875rem !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    border: 2px solid transparent !important;
    transition: all 0.15s ease !important;
}

.color-option:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1) !important;
}

.color-option[data-color="gray"] {
    background-color: #e5e7eb !important;
}

.color-option[data-color="green"] {
    background-color: #4ade80 !important;
}

.color-option[data-color="yellow"] {
    background-color: #facc15 !important;
}

.color-option[data-color="red"] {
    background-color: #f87171 !important;
}

.color-option.selected {
    border-color: #374151 !important;
    border-width: 2px !important;
    transform: scale(1.05) !important;
}

/* Status and Owner row */
.status-owner-row {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 1rem !important;
}

.status-section {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    flex: 0 0 auto !important;
}

/* Owner dropdown container */
.owner-dropdown-container {
    margin-left: 0.5rem !important;
    min-width: auto !important;
    margin-right: 0 !important;
}

/* Owner initials dropdown */
.owner-initials-dropdown {
    position: relative !important;
    cursor: pointer !important;
}

.current-owner-display {
    display: flex !important;
    align-items: center !important;
    gap: 0.25rem !important;
    padding: 0 0.25rem !important;
    border-radius: 0.375rem !important;
    background: white !important;
    transition: all 0.15s ease !important;
    min-width: auto !important;
}

.current-owner-display:hover {
    background-color: #f9fafb !important;
    box-shadow: 0 0 0 1px rgba(80, 98, 255, 0.1) !important;
}

.owner-initials-circle {
    width: 1.8rem !important;
    height: 1.5rem !important;
    border-radius: 8px !important;
    background-color: #2d2e320d !important;
    border: 1px solid #f1f1f1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

.owner-initials-text {
    color: #808596 !important;
    font-size: 0.7rem !important;
    font-weight: 500 !important;
    line-height: 1 !important;
}

.owner-icon {
    font-size: 0.75rem !important;
    color: #6b7280 !important;
    margin-left: 0.5rem !important;
    margin-right: 0.25rem !important;
}

.owner-dropdown-arrow {
    font-size: 0.625rem !important;
    color: #6b7280 !important;
    transition: transform 0.15s ease !important;
}

.owner-options-list {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    min-width: 12rem !important;
    max-width: 16rem !important;
    background: white !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 0.375rem !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
    z-index: 60 !important;
    margin-top: 0.25rem !important;
    max-height: 12rem !important;
    overflow-y: auto !important;
}

.owner-option {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 0.5rem !important;
    cursor: pointer !important;
    transition: background-color 0.15s ease !important;
}

.owner-option:hover {
    background-color: #f9fafb !important;
}

.owner-option:first-child {
    border-radius: 0.375rem 0.375rem 0 0 !important;
}

.owner-option:last-child {
    border-radius: 0 0 0.375rem 0.375rem !important;
}

.owner-name {
    font-size: 0.875rem !important;
    color: #374151 !important;
    font-weight: 400 !important;
    white-space: nowrap !important;
    flex: 1 !important;
    min-width: 0 !important;
}

/* Score slider container */
.score-slider-container {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    min-width: 7rem !important;
}

.key-result-score-slider {
    flex: 1 !important;
    height: 0.25rem !important;
    border-radius: 0.125rem !important;
    background: #e5e7eb !important;
    outline: none !important;
    cursor: pointer !important;
    appearance: none !important;
}

.key-result-score-slider::-webkit-slider-thumb {
    appearance: none !important;
    width: 1rem !important;
    height: 1rem !important;
    border-radius: 50% !important;
    background: #5062ff !important;
    cursor: pointer !important;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1) !important;
}

.key-result-score-slider::-moz-range-thumb {
    width: 1rem !important;
    height: 1rem !important;
    border-radius: 50% !important;
    background: #5062ff !important;
    cursor: pointer !important;
    border: 0 !important;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1) !important;
}

.score-display {
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    color: #1f2937 !important;
    min-width: 2rem !important;
    text-align: right !important;
}

.score-input {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    color: #1f2937 !important;
    min-width: 2rem !important;
    text-align: right !important;
    padding: 0 !important;
    margin: 0 !important;
    font-family: inherit !important;
}

.score-input:focus {
    background: rgba(80, 98, 255, 0.1) !important;
    border-radius: 0.125rem !important;
    padding: 0.125rem 0.25rem !important;
}

.score-input::-webkit-outer-spin-button,
.score-input::-webkit-inner-spin-button {
    appearance: none !important;
    margin: 0 !important;
}

.score-input[type=number] {
    appearance: none !important;
}

/* Mobile optimization */
@media (max-width: 768px) {
    .dropdown-item {
        font-size: 1rem !important;
    }
    
    .status-label {
        font-size: 1rem !important;
    }
    
    .score-input {
        font-size: 1rem !important;
        min-width: 2.25rem !important;
    }
    
    .score-percent {
        font-size: 1rem !important;
    }
}

.score-percent {
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    color: #1f2937 !important;
    margin-left: 0.125rem !important;
}


/* Vote count styles */
.vote-count {
    font-size: 0.75rem !important;
    color: #6b7280 !important;
    font-weight: 500 !important;
    margin-left: 0.25rem !important;
    background: #f3f4f6 !important;
    padding: 0.125rem 0.375rem !important;
    border-radius: 0.375rem !important;
    line-height: 1 !important;
    cursor: help !important;
    position: relative !important;
}

/* Enhanced tooltip for vote count */
.vote-count-tooltip {
    position: absolute !important;
    top: 50% !important;
    left: 100% !important;
    transform: translateY(-50%) !important;
    margin-left: 0.5rem !important;
    background: #1f2937 !important;
    color: white !important;
    padding: 0.5rem 0.75rem !important;
    border-radius: 0.375rem !important;
    font-size: 0.75rem !important;
    line-height: 1.4 !important;
    z-index: 1000 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
    min-width: 200px !important;
    max-width: 300px !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    text-align: left !important;
    opacity: 0 !important;
    transition: opacity 0.2s ease !important;
    pointer-events: none !important;
}

.vote-count-tooltip.show {
    opacity: 1 !important;
}

.vote-count-tooltip::before {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 0 !important;
    transform: translateY(-50%) translateX(-100%) !important;
    border: 4px solid transparent !important;
    border-right-color: #1f2937 !important;
}

/* AI icon gradient */
.ai-icon {
    background: linear-gradient(to right, #6366f1, #8b5cf6, #ec4899) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

/* Saved confirmation */
.saved-confirmation {
    position: absolute !important;
    top: 0.5rem !important;
    right: 0.5rem !important;
    background: #10b981 !important;
    color: white !important;
    padding: 0.375rem 0.75rem !important;
    border-radius: 0.5rem !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    z-index: 50 !important;
    opacity: 0 !important;
    transition: opacity 0.2s ease !important;
}

.saved-confirmation.show {
    opacity: 1 !important;
}

/* Ensure dropdown appears above other elements */
.key-result-container {
    position: relative !important;
    overflow: visible !important;
}

.key-result-description {
    cursor: pointer !important;
}

/* Additional styles for dropdown items */
.dropdown-item > div {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

/* Fix for objectives dropdown shift - remove 15px bottom margin */
.parent-item-form.gridspot.w-form,
.parent-item-form.form-parent-item-65436.gridspot.w-form,
.parent-item-form[class*="form-parent-item-"].gridspot.w-form,
.parent-item-form.form-parent-item-item_id.gridspot.w-form {
    margin-bottom: 0 !important;
}

/* Additional fix for any remaining margin-bottom issues */
.parent-item-form[class*="form-parent-item-"] {
    margin-bottom: 0 !important;
}

/* Dropdown highlight when open */
.key-result-description.dropdown-highlight {
    color: #1f2937 !important;
    background-color: rgba(80, 98, 255, 0.1) !important;
    border-radius: 0.25rem !important;
    margin-left: 0.375rem !important;
    margin-right: 0.25rem !important;
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 0 0 1px rgba(80, 98, 255, 0.2) !important;
}

/* Animation for dropdown appearance */
.key-result-dropdown.show {
    display: block !important;
    animation: dropdownFadeIn 0.15s ease-out !important;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Improved focus states for better accessibility */
.dropdown-item:focus-visible {
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(80, 98, 255, 0.5), 0 0 0 4px rgba(80, 98, 255, 0.1) !important;
}

/* Mobile responsiveness with Tailwind-inspired improvements */
@media (max-width: 768px) {
    /* Dropdown container adjustments */
    .key-result-dropdown {
        min-width: 16rem !important;
        max-width: calc(100vw - 2rem) !important;
        margin: 0.5rem !important;
    }
    
    /* Better touch targets for mobile */
    .dropdown-item {
        min-height: 3rem !important;
    }
    
    /* Color options - compact for mobile */
    .color-option {
        width: 1rem !important;
        height: 1rem !important;
        margin: 0.125rem !important;
    }
    
    /* Owner initials - compact for mobile to fit on one line */
    .owner-initials-circle {
        width: 1.5rem !important;
        height: 1.5rem !important;
    }
    
    .owner-initials-text {
        font-size: 0.625rem !important;
        font-weight: 500 !important;
    }
    
    /* Owner options - better mobile spacing */
    .owner-option {
        padding: 1rem !important;
        min-height: 3rem !important;
    }
    
    .owner-name {
        font-size: 1.125rem !important;
        font-weight: 500 !important;
    }
    
    .owner-options-list {
        min-width: 14rem !important;
        max-width: calc(100vw - 2rem) !important;
        right: 0 !important;
        left: auto !important;
    }
    
    /* Status and owner row - keep on same line but compact */
    .status-owner-row {
        flex-direction: row !important;
        align-items: center !important;
        gap: 0.5rem !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
    }
    
    .status-section {
        flex: 0 0 auto !important;
        justify-content: flex-start !important;
        flex-wrap: nowrap !important;
        min-width: 0 !important;
    }
    
    .owner-dropdown-container {
        flex-shrink: 0 !important;
        margin-left: 0.25rem !important;
        margin-top: 0 !important;
    }
    
    /* Current owner display - compact mobile sizing */
    .current-owner-display {
        padding: 0.25rem 0.5rem !important;
        min-width: auto !important;
        justify-content: center !important;
        max-width: fit-content !important;
    }
    
    .owner-icon {
        font-size: 0.875rem !important;
        margin-left: 0.75rem !important;
        margin-right: 0.375rem !important;
    }
    
    .owner-dropdown-arrow {
        font-size: 0.75rem !important;
    }
    
    /* Score input - better mobile experience */
    .score-input {
        width: 4rem !important;
        font-size: 1.125rem !important;
        text-align: center !important;
    }
    
    /* Action buttons - better mobile spacing */
    .action-buttons {
        gap: 0.75rem !important;
        padding: 0.75rem !important;
    }
    
    .action-button {
        padding: 0.75rem 1rem !important;
        font-size: 1rem !important;
        min-height: 2.5rem !important;
    }
}

/* Unread count badge styling */
.unread-count-badge {
    background: #f4f4f5 !important;
    color: #5062FF !important;
    border: 1px solid #f4f4f5 !important;
    border-radius: 8px !important;
    min-width: 1.25rem !important;
    height: 1.25rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.75rem !important;
    font-weight: 400 !important;
    margin-left: 0.5rem !important;
    line-height: 1 !important;
    padding: .5rem 0.5rem !important;
}

/* Mentioned styling - brand color, white text, 400 weight */
.unread-count-badge.mentioned {
    background: #5062FF !important;
    color: white !important;
    font-weight: 400 !important;
}

/* Unread messages styling - white background, brand color text */
.unread-count-badge.unread-messages {
    background: white !important;
    color: #5062FF !important;
    font-weight: 400 !important;
}

/* Mobile responsive adjustments for unread count badge */
@media screen and (max-width: 479px) {
    .unread-count-badge {
        min-width: 1rem !important;
        height: 1rem !important;
        font-size: 0.6875rem !important;
        margin-left: 0.375rem !important;
    }
}

/* Three dots menu styles */
.three-dots-menu {
    position: relative !important;
    margin-left: auto !important;
    padding: 0.25rem !important;
    cursor: pointer !important;
    border-radius: 0.25rem !important;
    transition: background-color 0.15s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 1.5rem !important;
    height: 1.5rem !important;
}

.three-dots-menu:hover {
    background-color: #f3f4f6 !important;
}

.three-dots-menu i {
    font-size: 0.75rem !important;
    color: #6b7280 !important;
    transition: color 0.15s ease !important;
}

.three-dots-menu:hover i {
    color: #374151 !important;
}

.three-dots-dropdown {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    background: white !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 0.375rem !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
    z-index: 60 !important;
    min-width: 8rem !important;
    padding: 0.25rem 0 !important;
    display: none !important;
    margin-top: 0.25rem !important;
}

.three-dots-dropdown.show {
    display: block !important;
    animation: threeDotsFadeIn 0.15s ease-out !important;
}

@keyframes threeDotsFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.three-dots-item {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 0.5rem 0.75rem !important;
    cursor: pointer !important;
    transition: background-color 0.15s ease !important;
    font-size: 0.875rem !important;
    color: #374151 !important;
}

.three-dots-item:hover {
    background-color: #fef2f2 !important;
    color: #dc2626 !important;
}

.three-dots-item i {
    font-size: 0.75rem !important;
    color: #6b7280 !important;
    transition: color 0.15s ease !important;
}

.three-dots-item:hover i {
    color: #dc2626 !important;
}

.three-dots-note {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.75rem !important;
    color: #6b7280 !important;
    line-height: 1.4 !important;
    border-top: 1px solid #f3f4f6 !important;
    margin-top: 0.25rem !important;
    background-color: #f9fafb !important;
    border-radius: 0 0 0.375rem 0.375rem !important;
}

/* Chat hashtag styling with rem font sizes */
.chat-hashtag {
    font-size: 0.875rem !important;
    color: #5062FF !important;
    text-decoration: underline !important;
    cursor: pointer !important;
    transition: color 0.15s ease !important;
}

.chat-hashtag:hover {
    color: #3B4CF5 !important;
}

/* Mobile responsive adjustments for three dots menu */
@media (max-width: 768px) {
    .three-dots-menu {
        width: 2rem !important;
        height: 2rem !important;
        padding: 0.5rem !important;
    }
    
    .three-dots-menu i {
        font-size: 1rem !important;
    }
    
    .three-dots-dropdown {
        min-width: 10rem !important;
        right: -0.5rem !important;
    }
    
    .three-dots-item {
        padding: 0.75rem 1rem !important;
        font-size: 1rem !important;
    }
    
    .three-dots-item i {
        font-size: 1rem !important;
    }
    
    .three-dots-note {
        padding: 0.75rem 1rem !important;
        font-size: 0.875rem !important;
    }
    
    /* Mobile font size for chat hashtag */
    .chat-hashtag {
        font-size: 1rem !important;
    }
} 