/**
 * InstaRank Gutenberg Panel Styles
 *
 * @package InstaRank
 * @since 1.4.0
 */

/* SERP Preview */
.instarank-serp-preview {
    background: #fff;
    border: 1px solid #e2e4e7;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.instarank-serp-preview .serp-container {
    font-family: Arial, sans-serif;
}

.instarank-serp-preview .serp-url {
    font-size: 12px;
    color: #202124;
    margin-bottom: 4px;
}

.instarank-serp-preview .serp-title {
    font-size: 18px;
    color: #1a0dab;
    line-height: 1.3;
    margin-bottom: 4px;
    cursor: pointer;
}

.instarank-serp-preview .serp-title:hover {
    text-decoration: underline;
}

.instarank-serp-preview .serp-description {
    font-size: 13px;
    color: #4d5156;
    line-height: 1.5;
}

/* Character Counter */
.instarank-char-counter {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.instarank-char-counter .count {
    font-size: 12px;
    color: #757575;
}

.instarank-char-counter .bar {
    flex: 1;
    height: 4px;
    background: #e2e4e7;
    border-radius: 2px;
    overflow: hidden;
    min-width: 100px;
}

.instarank-char-counter .fill {
    height: 100%;
    background: #00a32a;
    transition: width 0.2s ease;
}

.instarank-char-counter.status-too-long .fill {
    background: #d63638;
}

.instarank-char-counter.status-short .fill {
    background: #dba617;
}

.instarank-char-counter.status-empty .fill {
    background: #e2e4e7;
}

.instarank-char-counter .warning,
.instarank-char-counter .hint {
    font-size: 11px;
    width: 100%;
}

.instarank-char-counter .warning {
    color: #d63638;
}

.instarank-char-counter .hint {
    color: #757575;
}

/* Keyword Analysis */
.instarank-keyword-analysis {
    margin-top: 16px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
}

.instarank-keyword-analysis .score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 12px;
}

.instarank-keyword-analysis .score-badge.score-0,
.instarank-keyword-analysis .score-badge.score-1 {
    background: #d63638;
}

.instarank-keyword-analysis .score-badge.score-2 {
    background: #dba617;
}

.instarank-keyword-analysis .score-badge.score-3 {
    background: #00a32a;
}

.instarank-keyword-analysis .score-badge.score-4 {
    background: #007017;
}

.instarank-keyword-analysis .checks-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.instarank-keyword-analysis .checks-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 13px;
    color: #757575;
}

.instarank-keyword-analysis .checks-list li.check-pass {
    color: #00a32a;
}

.instarank-keyword-analysis .checks-list li.check-pass .dashicons {
    color: #00a32a;
}

.instarank-keyword-analysis .checks-list li.check-fail {
    color: #757575;
}

.instarank-keyword-analysis .checks-list li.check-fail .dashicons {
    color: #d63638;
}

.instarank-keyword-analysis .checks-list li .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Tab Panel */
.instarank-tabs {
    margin-top: 16px;
}

.instarank-tabs .components-tab-panel__tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 1px solid #e2e4e7;
    padding-bottom: 0;
}

.instarank-tabs .components-tab-panel__tabs button {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #757575;
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.instarank-tabs .components-tab-panel__tabs button:hover {
    color: #1d2327;
}

.instarank-tabs .components-tab-panel__tabs button.is-active {
    color: #2271b1;
    border-bottom-color: #2271b1;
}

/* Panel Footer */
.instarank-panel-footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    margin-top: 16px;
    border-top: 1px solid #e2e4e7;
}

.instarank-panel-footer a {
    font-size: 13px;
}

/* pSEO Fields Panel */
.instarank-pseo-fields-panel {
    background: #f8f9fa;
}

.instarank-pseo-fields-panel .components-panel__body-title {
    border-left: 3px solid #f97316;
}

/* Responsive adjustments */
@media (max-width: 782px) {
    .instarank-serp-preview .serp-title {
        font-size: 16px;
    }

    .instarank-tabs .components-tab-panel__tabs button {
        padding: 6px 12px;
        font-size: 12px;
    }
}
