/* Keyword Hive AutoLinker Admin Styles */

.kal-add-keyword {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
}

#kal-keywords-table {
    margin-top: 20px;
}

.tab-content {
    margin-top: 15px;
}

#kal-message {
    margin: 10px 0;
}

/* Suggestion styles */
.kal-suggestion-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.kal-suggestion-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.kal-suggestion-stats {
    margin-bottom: 5px;
    color: #666;
    font-size: 0.9em;
}

.kal-suggestion-score {
    color: #0073aa;
}

.kal-suggestion-links {
    color: #46b450;
}

.kal-suggestion-form {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
}

.kal-suggestion-keyword {
    width: 100%;
    margin-bottom: 5px;
}

.kal-suggestion-follow {
    margin-right: 5px;
}

/* Enhanced notice styling */
.notice-with-details {
    border-left: 4px solid #00a0d2;
    padding: 12px;
    margin: 15px 0;
    background: #f8f8f8;
}

.notice-with-details p {
    margin: 0.5em 0;
}

.notice-with-details mark {
    background-color: #ffffd8;
    padding: 2px 4px;
    font-weight: 500;
}

/* Highlight effects */
.kal-action-highlight {
    animation: kal-highlight-pulse 1.5s ease-in-out;
}

@keyframes kal-highlight-pulse {
    0% {
        background-color: rgba(70, 180, 80, 0.1);
    }

    50% {
        background-color: rgba(70, 180, 80, 0.3);
    }

    100% {
        background-color: rgba(70, 180, 80, 0);
    }
}

/* Link suggestion message details */
.kal-suggestion-details {
    display: flex;
    margin-top: 10px;
    padding: 10px;
    background: #f0f8ff;
    border-radius: 3px;
}

.kal-suggestion-details-column {
    flex: 1;
}

.kal-suggestion-details-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.kal-suggestion-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    color: #00a0d2;
    font-size: 20px;
}

/* GSC Connection Styles */
.kal-gsc-connect-container,
.kal-gsc-connected-container {
    background: #fff;
    border: 1px solid #ccd0d4;
    padding: 20px;
    margin: 20px 0;
    border-radius: 3px;
    max-width: 100%;
}

.kal-connected {
    color: #46b450;
    font-weight: bold;
    margin-right: 10px;
}

.kal-gsc-status {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.kal-gsc-import,
.kal-gsc-auto-suggest,
.kal-gsc-popular-pages {
    margin-bottom: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.metrics {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.metric {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
}

.clicks {
    background-color: #e7f4fd;
    color: #0075b3;
}

.impressions {
    background-color: #f1f8e9;
    color: #4caf50;
}

.links-count {
    margin-top: 3px;
    color: #666;
}

/* Popular Pages and Link Creation Styles */
.kal-popular-pages {
    margin-top: 20px;
}

.kal-popular-pages h2 {
    margin-bottom: 10px;
}

.kal-popular-pages .description {
    margin-bottom: 20px;
    color: #555;
}

/* Link Creation Page */
.kal-content-preview {
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 3px;
}

.kal-content-container {
    max-height: 300px;
    overflow-y: auto;
    padding: 15px;
    background: #fff;
    border: 1px solid #e5e5e5;
    margin-top: 10px;
}

#kal-selectable-content {
    cursor: text;
}

#kal-selectable-content a {
    cursor: not-allowed;
    background-color: #f0f0f0;
    text-decoration: none;
    color: #777;
}

.kal-selected-text-container {
    margin: 20px 0;
    padding: 15px;
    background: #e7f7ff;
    border: 1px solid #c2e3f7;
    border-radius: 3px;
}

#kal-selected-text {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 10px;
    padding: 5px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.kal-target-page-selection {
    margin: 20px 0;
}

.kal-tabs {
    display: flex;
    border-bottom: 1px solid #ccc;
    margin-bottom: 15px;
}

.kal-tab-button {
    padding: 8px 15px;
    background: #f3f3f3;
    border: 1px solid #ccc;
    border-bottom: none;
    border-radius: 3px 3px 0 0;
    margin-right: 5px;
    cursor: pointer;
}

.kal-tab-button.active {
    background: #fff;
    border-bottom: 1px solid #fff;
    margin-bottom: -1px;
}

.kal-tab-content {
    padding: 15px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-top: none;
    min-height: 200px;
}

.kal-loading {
    text-align: center;
    padding: 20px;
    color: #777;
}

.kal-search-box {
    display: flex;
    margin-bottom: 15px;
}

#kal-page-search {
    flex-grow: 1;
    margin-right: 10px;
}

.kal-page-suggestion {
    padding: 10px;
    border: 1px solid #e5e5e5;
    border-radius: 3px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.kal-page-suggestion:hover {
    background-color: #f5f5f5;
}

.kal-page-suggestion.selected {
    background-color: #e7f7ff;
    border-color: #c2e3f7;
}

.kal-page-suggestion h4 {
    margin: 0 0 5px 0;
}

.page-meta {
    display: flex;
    font-size: 12px;
    color: #666;
}

.page-meta span {
    margin-right: 15px;
}

.page-incoming-links {
    color: #d54e21;
}

.relevance-score {
    color: #0073aa;
}

.kal-create-link-actions {
    margin: 20px 0;
    padding: 20px;
    background: #f0f7fb;
    border: 1px solid #c2e3f7;
    border-radius: 3px;
}

.kal-link-preview {
    margin: 15px 0;
    padding: 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.kal-link-preview div {
    margin-bottom: 5px;
}

.kal-link-preview span {
    font-weight: normal;
}

.kal-link-options {
    margin: 15px 0;
}

.kal-link-success {
    margin: 20px 0;
    padding: 20px;
    background: #f0fff0;
    border: 1px solid #c3e6c3;
    border-radius: 3px;
    text-align: center;
}

.kal-link-success-icon {
    font-size: 48px;
    color: #46b450;
    margin-bottom: 15px;
}

.kal-link-details {
    margin: 15px 0;
    padding: 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.kal-next-actions {
    margin: 20px 0;
    text-align: center;
}

.kal-next-actions .button {
    margin: 0 5px;
}

.kal-link-plugin {
    background-color: #e7f7ff;
    border-left: 3px solid #2271b1;
    padding-left: 8px;
}

.kal-link-discovered {
    background-color: #f8f8f8;
    border-left: 3px solid #c3c4c7;
    padding-left: 8px;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.kal-url-autocomplete-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 400px;
}

.kal-autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.kal-suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.kal-suggestion-item:hover,
.kal-suggestion-item.highlighted {
    background-color: #f0f8ff;
}

.kal-suggestion-item:last-child {
    border-bottom: none;
}

.kal-suggestion-title {
    font-weight: 500;
    color: #333;
    margin-bottom: 2px;
}

.kal-suggestion-url {
    font-size: 12px;
    color: #666;
    font-family: monospace;
}

.kal-suggestion-type {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    margin-left: 8px;
}

/* Export button styling */
#kal-export-keywords {
    margin-left: 10px;
}

#kal-export-keywords .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.kal-progress-bar {
    height: 20px;
    background-color: #f0f0f0;
    border-radius: 3px;
    margin-top: 5px;
    overflow: hidden;
}

.kal-progress-bar-fill {
    height: 100%;
    background-color: #2271b1;
    transition: width 0.3s ease;
}

.suggestion-actions {
    position: relative;
}

.suggestion-actions .action-spinner {
    margin-left: 8px;
}

.suggestion-row-success {
    background-color: #d1eddd !important;
}

.suggestion-row-approved {
    opacity: 0.6;
}

.suggestion-row-rejected {
    opacity: 0.6;
}

.kal-link-plugin {
    background-color: #e7f7ff;
    border-left: 3px solid #2271b1;
    padding-left: 8px;
    margin-bottom: 3px;
}

.kal-link-discovered {
    background-color: #f8f8f8;
    border-left: 3px solid #c3c4c7;
    padding-left: 8px;
    margin-bottom: 3px;
}

.kal-link-external {
    background-color: #f0f7e8;
    border-left: 3px solid #72a83d;
    padding-left: 8px;
    margin-bottom: 3px;
}

.kal-link-type {
    font-style: italic;
    color: #666;
}

.kal-progress-bar {
    height: 20px;
    background-color: #f0f0f0;
    border-radius: 3px;
    margin-top: 5px;
    overflow: hidden;
}

.kal-progress-bar-fill {
    height: 100%;
    background-color: #2271b1;
    transition: width 0.3s ease;
}

.links-list li {
    margin-bottom: 5px;
}

.showing-count {
    display: block;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

.actions-column {
    width: 120px;
    text-align: center;
}

.actions-column .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.actions-column .dashicons {
    margin-right: 3px;
}

.kal-notice-columns {
    display: flex;
    flex-flow: row wrap;
}

.kal-notice-column {
    flex: 1 0 60%
}

.kal-notice-column+.kal-notice-column {
    flex: 1 0 40%
}