/* Keyword Discovery Table Fixes */

/* Fix URL column overflow */
.aysa-keywords-table .aysa-url-col {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aysa-keywords-table .aysa-url-col span {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}



/* Fix desired target dropdown */
.aysa-keywords-table .aysa-desired-position {
    max-width: 95px;
    font-size: 12px;
    padding: 3px 4px;
    height: 28px;
    box-sizing: border-box;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.aysa-keywords-table .aysa-desired-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 3px;
}

.aysa-keywords-table .aysa-remove-target {
    color: #ea4335;
    cursor: pointer;
    font-size: 12px;
    padding: 2px 3px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Fix dropdowns in action column */
.aysa-keywords-table .aysa-dropdown-content {
    position: fixed !important;
    z-index: 99999 !important;
    min-width: 200px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Style for dropdown menu */
.aysa-dropdown-menu {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-size: 13px;
    position: fixed !important;
    z-index: 99999 !important;
}

.dropdown-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dropdown-item {
    border-bottom: 1px solid #eee;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-action, 
.dropdown-submenu-toggle {
    background: none;
    border: none;
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 12px;
    cursor: pointer;
    color: #333;
}

.dropdown-action:hover, 
.dropdown-submenu-toggle:hover {
    background-color: #f5f5f5;
}

.dropdown-submenu-container {
    border-left: 3px solid #4285f4;
    margin-left: 10px;
}

.dropdown-submenu-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dropdown-category-button {
    background: none;
    border: none;
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 12px;
    cursor: pointer;
    color: #333;
}

.dropdown-category-button:hover {
    background-color: #f5f5f5;
}

.dropdown-loading,
.dropdown-no-items,
.dropdown-error {
    padding: 10px;
    color: #666;
    font-style: italic;
}

/* Force tables to respect column widths */
.aysa-keywords-table {
    table-layout: fixed !important;
}

/* Fix for competitor button wrapping */
.aysa-competitor-selector {
    display: flex;
    flex-wrap: wrap !important;
    gap: 10px;
}

.aysa-tab-buttons {
    display: flex;
    flex-wrap: wrap !important;
    gap: 10px;
}

.aysa-keywords-table th, 
.aysa-keywords-table td {
    box-sizing: border-box;
    overflow: hidden;
}

/* Ensure action button width and hover colors */
.aysa-action-btn {
    width: 80px !important;
    max-width: 80px !important;
    overflow: hidden;
    white-space: nowrap;
    transition: background-color 0.2s ease !important;
}

.aysa-action-btn:hover {
    background-color: #1565c0 !important;
}

.aysa-btn-associated:hover {
    background-color: #2e7d32 !important;
}

.aysa-table-responsive {
    overflow-x: auto !important;
    overflow-y: auto !important;
    max-height: calc(100vh - 230px) !important;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
} 
