/* Perplexity Search Styles */

.perplexity-search-container {
    max-width: 90%;
    margin: 0 auto;
    padding: 5px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.perplexity-search-form {
    position: relative;
    margin-bottom: 30px;
}

.perplexity-search-input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    font-size: 12px;
    border: 1px solid #fff;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.2s;
    color: #222;
}

.perplexity-search-input:focus {
    border-color: #2271b1;
}

.perplexity-search-buttons {
	background-color: #fff;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 10px;
}

.perplexity-search-clear,
.perplexity-search-submit {
    background: none;
    background-color: #fff;
    border: none;
    cursor: pointer;
    color: #333;
    transition: color 0.2s;	
}

.perplexity-search-clear{
        padding-top: 2px;
        padding-bottom: 2px;
        padding-left: 8px;
        padding-right: 0px;
    }


.perplexity-search-submit {
        padding-top: 2px;
        padding-bottom: 2px;
        padding-left: 0px;
        padding-right: 0px;
    }  


@media only screen and (max-width: 600px) {
    .perplexity-search-clear{
        padding-top: 2px;
        padding-bottom: 2px;
        padding-left: 8px;
        padding-right: 0px;
    }
    .perplexity-search-submit {
        padding-top: 2px;
        padding-bottom: 2px;
        padding-left: 0px;
        padding-right: 0px;
    }  
  }




.perplexity-search-clear:hover,
.perplexity-search-submit:hover {
    color: #2271b1;
}

.perplexity-search-results {
    margin-top: 30px;
}

/* Summary Section */
.perplexity-summary {
    margin-bottom: 40px;
    padding: 25px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.perplexity-summary h3 {
    margin: 0 0 15px 0;
    font-size: 24px;
    color: #000;
    font-weight: 600;
}

.perplexity-answer {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

/* Related Articles Section */
.perplexity-related-articles {
    margin-top: 40px;
}

.perplexity-related-articles h3 {
    margin: 0 0 25px 0;
    font-size: 24px;
    color: #000;
    font-weight: 600;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e5e5;
}

.perplexity-articles-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.perplexity-article-item {
    display: flex;
    gap: 16px;
    padding: 0;
    background: #fff;
    text-decoration: none;
    position: relative;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 24px;
}

.perplexity-article-item:last-child {
    border-bottom: none;
}

.perplexity-article-image {
    flex: 0 0 120px;
    border-radius: 4px;
    overflow: hidden;
    height: 80px;
}

.perplexity-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.perplexity-article-content {
    flex: 1;
    padding: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.perplexity-article-title {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #000;
    text-decoration: none;
    margin-bottom: 1px;
    line-height: 1.4;
}

.perplexity-article-title:hover {
    color: #cf2e2e;
    text-decoration: underline;
}

.perplexity-article-snippet {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #666;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.perplexity-article-date {
    color: #333;
    font-size: 0.8em;
    margin-top: 2px;
    font-style: normal;
    margin-bottom: 6px;
    padding-top: 2px;
}

/* Loading and Error States */
.perplexity-loading,
.perplexity-error {
    padding: 20px;
    text-align: center;
    background: #f8f9fa;
    border-radius: 8px;
    color: #666;
}

.perplexity-error {
    background-color: #fff3f3;
    color: #dc3545;
    border: 1px solid #ffe0e0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .perplexity-article-item {
        gap: 12px;
    }
    
    .perplexity-article-image {
        flex: 0 0 100px;
        height: 67px;
    }
}

/* Hover Effects */
.perplexity-article-item {
    position: relative;
}

.perplexity-article-item::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: #e5e5e5;
}

.perplexity-article-item:last-child::after {
    display: none;
}

/* Sidebar Perplexity Search (sidebar_pp_search) */
.sidebar-pp-search-form {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin: 10px 0;
    background: #fff;
    border: 1px solid #333;
    border-radius: 2px;
    padding: 0;
}
.sidebar-pp-search-input {
    flex: 1;
    padding: 7px 10px;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 13px;
    font-family: Roboto, Arial, sans-serif;
    background: #fff;
    height: 36px;
    outline: none;
}
.sidebar-pp-search-buttons {
    display: flex;
    flex-direction: row;
    align-items: center;
    background: #fff;
    border-radius: 0 4px 4px 0;
    border-left: 1px solid #eee;
    height: 36px;
    padding: 0;
}
.sidebar-pp-search-clear,
.sidebar-pp-search-submit {
    background: #fff;
    border: none;
    cursor: pointer;
    padding: 0 10px;
    color: #333;
    display: flex;
    align-items: center;
    height: 36px;
    border-radius: 0;
    transition: background 0.2s, color 0.2s;
    font-size: 16px;
}
.sidebar-pp-search-clear:hover,
.sidebar-pp-search-submit:hover {
    background: #f0f0f0;
    color: #000;
}
.sidebar-pp-search-clear svg,
.sidebar-pp-search-submit svg {
    display: block;
}
/* Remove old sidebar-pp-search-btn rule */
.sidebar-pp-search-btn { display: none !important; }

.pp-credits {
    display: flex;
    align-items: flex-end;
    justify-content: right;
    align-content: flex-end;
    width: 100%;
    margin-bottom:5px;
    padding-right: 10px;
      }

  
  .pp-credits-text {
    font-size: 10px;
    font-family: Roboto, Arial, sans-serif;
    color: #666;
  }