/**
 * Ask System Styles - HarmonyDrop
 * Q&A feature styling
 */

/* ============================================
   Ask Page Wrapper
   ============================================ */
.ask_page_wrapper {
    padding: 20px 0;
}

.ask_page_header {
    margin-bottom: 24px;
}

.ask_page_header h1 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 8px 0;
}

.ask_page_header h1 svg {
    color: var(--primary-color);
}

.ask_page_header p {
    color: var(--text-muted);
    margin: 0;
    font-size: 14px;
}

/* ============================================
   Artist Header (on artist ask page)
   ============================================ */
.ask_artist_header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: var(--card-bg);
    border-radius: 12px;
    margin-bottom: 24px;
}

.ask_artist_avatar {
    flex-shrink: 0;
}

.ask_artist_avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.ask_artist_info h1 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    margin: 0 0 4px 0;
}

.ask_artist_info h1 a {
    color: var(--text-color);
    text-decoration: none;
}

.ask_artist_info h1 a:hover {
    color: var(--primary-color);
}

.ask_artist_info .verified-badge {
    color: var(--primary-color);
}

.ask_artist_bio {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0 0 12px 0;
}

.ask_stats_bar {
    display: flex;
    gap: 20px;
}

.ask_stat {
    font-size: 13px;
    color: var(--text-muted);
}

.ask_stat strong {
    color: var(--text-color);
    font-weight: 600;
}

.ask_stat.unanswered strong {
    color: var(--warning-color, #f59e0b);
}

/* ============================================
   Ask Box (Question Submission Form)
   ============================================ */
.ask_box {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.ask_box_header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.ask_box_header img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.ask_box_header span {
    font-size: 14px;
    color: var(--text-color);
}

.ask_box_header span strong {
    color: var(--primary-color);
}

.ask_textarea_wrapper {
    position: relative;
    margin-bottom: 16px;
}

.ask_textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.2s;
}

.ask_textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.ask_textarea::placeholder {
    color: var(--text-muted);
}

.ask_char_counter {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

.ask_char_counter.limit {
    color: var(--danger-color, #ef4444);
}

.ask_box_footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ask_anonymous_toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ask_anonymous_toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
}

.ask_anonymous_toggle label {
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
}

.ask_submit_btn {
    padding: 10px 24px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.ask_submit_btn:hover {
    background: var(--primary-hover);
}

.ask_submit_btn:active {
    transform: scale(0.98);
}

.ask_submit_btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ============================================
   Question Item
   ============================================ */
.ask_question_item {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    transition: box-shadow 0.2s;
}

.ask_question_item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ask_question_header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}

.ask_question_user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ask_question_user img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.ask_question_user_info {
    display: flex;
    flex-direction: column;
}

.ask_question_user_name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    text-decoration: none;
}

.ask_question_user_name:hover {
    color: var(--primary-color);
}

.ask_question_meta {
    font-size: 12px;
    color: var(--text-muted);
}

.ask_question_meta a {
    color: var(--text-muted);
    text-decoration: none;
}

.ask_question_meta a:hover {
    color: var(--primary-color);
}

.ask_question_actions {
    position: relative;
}

.ask_question_actions_btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-muted);
    border-radius: 50%;
    transition: background 0.2s;
}

.ask_question_actions_btn:hover {
    background: var(--hover-bg);
}

.ask_question_dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    min-width: 160px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
    display: none;
}

.ask_question_dropdown.show {
    display: block;
}

.ask_question_dropdown a,
.ask_question_dropdown button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: none;
    color: var(--text-color);
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

.ask_question_dropdown a:hover,
.ask_question_dropdown button:hover {
    background: var(--hover-bg);
}

.ask_question_dropdown .danger {
    color: var(--danger-color, #ef4444);
}

/* Question Content */
.ask_question_content {
    margin-bottom: 16px;
}

.ask_question_text {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-color);
    margin: 0;
}

.ask_question_text a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Answer Section */
.ask_answer_section {
    background: var(--secondary-bg);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.ask_answer_header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.ask_answer_header img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.ask_answer_artist_name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ask_answer_artist_name:hover {
    color: var(--primary-color);
}

.ask_answer_artist_name .verified-badge {
    color: var(--primary-color);
    width: 14px;
    height: 14px;
}

.ask_answer_time {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: auto;
}

.ask_answer_text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-color);
    margin: 0;
}

/* Answer Form (for artist) */
.ask_answer_form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ask_answer_textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 14px;
    resize: vertical;
}

.ask_answer_textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.ask_answer_submit {
    align-self: flex-end;
    padding: 8px 20px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.ask_answer_submit:hover {
    background: var(--primary-hover);
}

/* Question Footer */
.ask_question_footer {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.ask_action_btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    padding: 6px 10px;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}

.ask_action_btn:hover {
    background: var(--hover-bg);
    color: var(--text-color);
}

/* Like button styles */
.like_question {
    color: rgba(255,255,255,0.6) !important;
    transition: color 0.3s ease;
}

.like_question svg {
    fill: currentColor;
    transition: fill 0.3s ease;
}

.like_question:hover {
    color: rgba(255,255,255,0.8) !important;
}

.ask_action_btn.liked,
.like_question.liked {
    color: #ef4444 !important;
}

.ask_action_btn.liked svg,
.like_question.liked svg {
    fill: currentColor !important;
}

.ask_action_btn svg {
    width: 18px;
    height: 18px;
}

.ask_views {
    font-size: 13px;
    color: var(--text-muted);
    margin-left: auto;
}

/* ============================================
   Tabs
   ============================================ */
.ask_tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.ask_tab {
    padding: 10px 20px;
    background: var(--secondary-bg);
    border: none;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.ask_tab:hover {
    background: var(--hover-bg);
}

.ask_tab.active {
    background: var(--primary-color);
    color: #fff;
}

.ask_tab .badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    margin-left: 6px;
}

/* Navigation Tabs */
.ask_nav_tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.ask_nav_tab {
    padding: 8px 16px;
    color: var(--text-muted);
    font-size: 14px;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}

.ask_nav_tab:hover {
    background: var(--hover-bg);
    color: var(--text-color);
}

.ask_nav_tab.active {
    color: var(--primary-color);
    font-weight: 500;
}

/* ============================================
   Empty State
   ============================================ */
.ask_empty_state {
    text-align: center;
    padding: 60px 20px;
    background: var(--card-bg);
    border-radius: 12px;
}

.ask_empty_icon {
    margin-bottom: 16px;
}

.ask_empty_icon svg {
    color: var(--text-muted);
    opacity: 0.5;
}

.ask_empty_state h3 {
    font-size: 18px;
    color: var(--text-color);
    margin: 0 0 8px 0;
}

.ask_empty_state p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

/* ============================================
   Sidebar
   ============================================ */
.ask_sidebar {
    position: sticky;
    top: 80px;
}

.ask_sidebar_section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.ask_sidebar_section h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ask_sidebar_link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    transition: background 0.2s;
    margin: -4px -12px;
}

.ask_sidebar_link:hover {
    background: var(--hover-bg);
}

.ask_sidebar_link svg {
    color: var(--primary-color);
}

.ask_about p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

/* Stats */
.ask_stats .ask_stat_row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.ask_stats .ask_stat_row:last-child {
    border-bottom: none;
}

.ask_stat_label {
    font-size: 13px;
    color: var(--text-muted);
}

.ask_stat_value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color);
}

/* Top Artists */
.ask_top_artists {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ask_top_artist {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    padding: 8px;
    margin: -8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.ask_top_artist:hover {
    background: var(--hover-bg);
}

.ask_top_artist img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.ask_top_artist_info {
    display: flex;
    flex-direction: column;
}

.ask_top_artist_info .name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-color);
}

.ask_top_artist_info .count {
    font-size: 12px;
    color: var(--text-muted);
}

/* Suggested Artists */
.ask_suggested_artists {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ask_suggested_artist {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    padding: 8px;
    margin: -8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.ask_suggested_artist:hover {
    background: var(--hover-bg);
}

.ask_suggested_artist img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.ask_suggested_artist_info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.ask_suggested_artist_info .name {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-color);
}

.ask_suggested_artist_info .username {
    font-size: 12px;
    color: var(--text-muted);
}

.ask_ask_btn_small {
    padding: 6px 14px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.ask_ask_btn_small:hover {
    background: var(--primary-hover);
}

/* ============================================
   Search Form
   ============================================ */
.ask_search_form {
    margin-bottom: 24px;
}

.ask_search_input_wrapper {
    display: flex;
    gap: 8px;
}

.ask_search_input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 14px;
    transition: border-color 0.2s;
}

.ask_search_input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.ask_search_btn {
    padding: 12px 20px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.ask_search_btn:hover {
    background: var(--primary-hover);
}

.ask_search_results_header {
    margin-bottom: 16px;
}

.ask_search_results_header p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

/* ============================================
   Feed Toggle (on main feed page)
   ============================================ */
.feed_mode_toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    padding: 4px;
    background: var(--secondary-bg);
    border-radius: 10px;
    width: fit-content;
}

.feed_mode_btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.feed_mode_btn:hover {
    color: var(--text-color);
}

.feed_mode_btn.active {
    background: var(--card-bg);
    color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.feed_mode_btn svg {
    width: 18px;
    height: 18px;
}

/* ============================================
   Responsive Styles
   ============================================ */
@media (max-width: 991px) {
    .ask_sidebar {
        position: static;
        margin-top: 24px;
    }
}

@media (max-width: 767px) {
    .ask_artist_header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .ask_stats_bar {
        justify-content: center;
    }
    
    .ask_box_footer {
        flex-direction: column;
        gap: 12px;
    }
    
    .ask_submit_btn {
        width: 100%;
    }
    
    .ask_question_footer {
        flex-wrap: wrap;
    }
    
    .ask_views {
        width: 100%;
        margin-left: 0;
        margin-top: 8px;
    }
    
    .feed_mode_toggle {
        width: 100%;
    }
    
    .feed_mode_btn {
        flex: 1;
        justify-content: center;
    }
}

/* ============================================
   Dark Mode Adjustments
   ============================================ */
[data-theme="dark"] .ask_question_item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .ask_question_dropdown {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* ============================================
   Animation
   ============================================ */
@keyframes askFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ask_question_item {
    animation: askFadeIn 0.3s ease-out;
}

/* Loading State */
.ask_loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.ask_loading_spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   Ask Activity in Feed
   ============================================ */
.feed_post.ask_activity .fp_head {
    padding-left: 60px !important;
}

.feed_post.ask_activity .fp_head > a {
    position: absolute;
    left: 15px;
    top: 15px;
}

.feed_post.ask_activity .fp_head > a img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}
