/* Favorites Dashboard Styles */
.ft-dashboard {
    font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    background-color: #fff !important;
    border-radius: 5px !important;
    padding: 24px !important;
}

.ft-dashboard * {
    box-sizing: border-box;
}

/* Aplicar Quicksand a elementos específicos */
.ft-dashboard-title,
.ft-dashboard-subtitle,
.ft-dashboard-tab,
.ft-dashboard-section-title,
.ft-favorite-title,
.ft-favorite-meta,
.ft-empty-message,
.ft-clear-all-button {
    font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Dashboard Header */
.ft-dashboard-header {
    text-align: center;
    margin-bottom: 24px;
}

.ft-dashboard-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin: 0 0 8px;
}

.ft-dashboard-subtitle {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* Dashboard Tabs */
.ft-dashboard-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
    overflow-x: auto;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.ft-dashboard-tab {
    display: inline-flex !important;
    align-items: center !important;
    padding: 10px 16px !important;
    background-color: #f5f5f5 !important;
    border-radius: 5px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #555 !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.ft-dashboard-tab:hover {
    background-color: #1A1365 !important;
    color: white !important;
    box-shadow: 0 2px 4px rgba(26, 19, 101, 0.2) !important;
}

.ft-dashboard-tab.ft-tab-active {
    background-color: #0157E9 !important;
    color: white !important;
}

.ft-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.1);
    min-width: 24px;
    height: 24px;
    border-radius: 12px;
    padding: 0 8px;
    margin-left: 8px;
    font-size: 12px;
    font-weight: 700;
}

.ft-tab-active .ft-count {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Dashboard Sections */
.ft-dashboard-section {
    margin-bottom: 16px !important;
    border: 1px solid #DAE2E3 !important;
    border-radius: 5px !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
}

.ft-section-hidden {
    display: none;
}

.ft-dashboard-section-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 16px !important;
    background-color: #f9f9f9 !important;
    cursor: pointer !important;
    border-bottom: 1px solid #DAE2E3 !important;
}

.ft-dashboard-section-title {
    display: flex;
    align-items: center;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.ft-section-count {
    margin-left: 8px;
    font-size: 14px;
    color: #666;
}

.ft-dashboard-section-actions {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.ft-clear-type-button,
.ft-collapse-button {
    background: #0157E9 !important;
    border: none !important;
    cursor: pointer !important;
    padding: 6px !important;
    border-radius: 5px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background-color 0.2s ease !important;
}

.ft-clear-type-button:hover,
.ft-collapse-button:hover {
    background-color: #1A1365 !important;
    box-shadow: 0 2px 4px rgba(26, 19, 101, 0.2) !important;
}

.ft-clear-type-button svg,
.ft-collapse-button svg {
    width: 20px !important;
    height: 20px !important;
    fill: #ffffff !important;
}

.ft-section-collapsed .ft-icon-collapse {
    display: none;
}

.ft-section-collapsed .ft-icon-expand {
    display: block !important;
}

/* Section Content */
.ft-dashboard-section-content {
    padding: 16px;
}

.ft-section-collapsed .ft-dashboard-section-content {
    display: none;
}

.ft-empty-message {
    text-align: center;
    padding: 24px;
    color: #888;
    font-style: italic;
}

/* Favorite Items */
.ft-favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
}

.ft-favorite-item {
    background-color: white !important;
    border-radius: 5px !important;
    overflow: hidden !important;
    transition: all 0.2s ease !important;
    margin-bottom: 10px !important;
}

.ft-favorite-item:hover {
    transform: none !important;
}

.ft-favorite-inner {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    padding: 10px;
    width: 100%;
    position: relative;
    flex-wrap: nowrap;
    gap: 10px;
}

.ft-favorite-thumbnail {
    position: relative;
    width: 60px;
    height: 60px;
    min-width: 60px;
    flex-shrink: 0;
    overflow: hidden;
    background-color: #f0f0f0;
    border-radius: 50px;
    margin-right: 10px;
}

.ft-dashboard .ft-favorite-thumbnail img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
    display: block !important;
    position: static !important;
    top: auto !important;
    left: auto !important;
    bottom: auto !important;
    right: auto !important;
    border-radius: 50px !important;
    max-width: none !important;
    max-height: none !important;
}

.ft-favorite-content {
    flex: 1;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: calc(100% - 60px);
    overflow: hidden;
}

.ft-favorite-title {
    margin: 0 0 5px;
    font-size: 15px;
    line-height: 1.2;
    font-weight: 500;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    width: 100%;
    max-height: 2.4em;
    overflow: hidden;
}

.ft-favorite-title a {
    color: inherit;
    text-decoration: none;
    display: inline;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.ft-favorite-title a:hover {
    color: #0066cc;
}

.ft-favorite-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #777;
    margin-top: 5px;
    width: 100%;
    flex-wrap: nowrap;
}

.ft-favorite-date {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ft-remove-favorite {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    min-width: 24px;
    border-radius: 50%;
    background-color: rgba(255, 0, 0, 0.1);
    color: #ff3333;
    margin-left: 8px;
    flex-shrink: 0;
}

.ft-favorite-item:hover .ft-remove-favorite {
    opacity: 1;
}

.ft-remove-favorite:hover {
    background-color: rgba(255, 0, 0, 0.2);
}

.ft-remove-favorite svg {
    width: 16px;
    height: 16px;
}

/* Avatar específicos para tipo profile/user */
.favorites-trae-avatar-wrapper {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: #f5f5f5 !important;
}

.ft-dashboard .favorites-trae-avatar {
    width: 80px !important;
    height: 80px !important;
    border-radius: 8px !important;
    object-fit: contain !important;
    object-position: center center !important;
    position: static !important;
    top: auto !important;
    left: auto !important;
    bottom: auto !important;
    right: auto !important;
    max-width: none !important;
    max-height: none !important;
}

/* Estilos para los marcadores de posición */
.ft-placeholder-thumbnail {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: #f0f0f0 !important;
    border-radius: 50% !important;
}

.ft-placeholder-thumbnail .dashicons {
    font-size: 24px !important;
    color: #999 !important;
    width: 24px !important;
    height: 24px !important;
}

.ft-placeholder-link {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
}

.ft-item-removing {
    opacity: 0.5 !important;
    pointer-events: none !important;
}

.ft-favorite-info {
    flex-grow: 1 !important;
    min-width: 0 !important;
    margin-right: 12px !important;
}

.ft-favorite-title {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #333 !important;
    margin: 0 0 4px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.ft-favorite-meta {
    font-size: 12px !important;
    color: #777 !important;
}

/* Buttons */
.ft-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    background-color: #f0f0f0 !important;
    color: #555 !important;
}

.ft-button:hover {
    background-color: #e0e0e0 !important;
    background-color: #e0e0e0;
}

.ft-button svg {
    width: 16px;
    height: 16px;
    margin-right: 4px;
}

.ft-button-danger {
    background-color: #ffe5e5 !important;
    color: #fe6464 !important;
}

.ft-button-danger:hover {
    background-color: #ffcccc !important;
}

.ft-remove-favorite {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background-color: #f8f8f8 !important;
    color: #fe6464 !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0 !important;
}

.ft-remove-favorite:hover {
    background-color: #ffe5e5 !important;
    color: #fe6464 !important;
}

.ft-remove-favorite svg {
    width: 16px;
    height: 16px;
}

/* Clear All Button */
.ft-dashboard-footer {
    display: flex;
    justify-content: center;
    margin-top: 32px;
}

.ft-clear-all-button {
    padding: 12px 24px !important;
    font-size: 16px !important;
    background-color: #0157E9 !important;
    color: white !important;
    border: none !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease !important;
    box-shadow: 0 2px 4px rgba(1, 87, 233, 0.2) !important;
}

.ft-clear-all-button:hover {
    background-color: #1A1365 !important;
    box-shadow: 0 2px 4px rgba(26, 19, 101, 0.2) !important;
}

.ft-clear-all {
    padding: 12px 24px !important;
    font-size: 16px !important;
    background-color: #fe6464 !important;
    color: white !important;
}

.ft-clear-all:hover {
    background-color: #e53935 !important;
}

.ft-button-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ft-button-disabled:hover {
    background-color: #ff5252;
}

/* Loading States */
.ft-loading {
    position: relative;
    min-height: 200px;
}

.ft-loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid"><circle cx="50" cy="50" r="32" stroke-width="8" stroke="%234a6cf7" stroke-dasharray="50.26548245743669 50.26548245743669" fill="none" stroke-linecap="round" transform="rotate(103.591 50 50)"><animateTransform attributeName="transform" type="rotate" dur="1s" repeatCount="indefinite" keyTimes="0;1" values="0 50 50;360 50 50"/></circle></svg>') center no-repeat;
    background-size: 50px;
    z-index: 10;
}

.ft-section-clearing::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    z-index: 10;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ft-dashboard {
        padding: 16px;
        border-radius: 8px;
    }
    
    .ft-dashboard-title {
        font-size: 24px;
    }
    
    .ft-favorites-list {
        grid-template-columns: 1fr;
    }
    
    .ft-dashboard-tabs {
        padding-bottom: 8px;
    }
    
    .ft-dashboard-tab {
        padding: 8px 12px;
        font-size: 13px;
    }

    .ft-clear-all-button {
        width: 100%;
    }
}
