/**
 * @package     Joomla.Plugin
 * @subpackage  System.FavouriteSubmission
 *
 * @copyright   Copyright (C) 2026 IDLweb. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

.submission-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0;
    align-items: center;
}

.btn-favourite {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #495057;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    margin: 10px 0;
}

.btn-favourite:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
    color: #212529;
    text-decoration: none;
}

.btn-favourite:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

.btn-favourite:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-favourite.loading {
    position: relative;
    color: transparent;
}

.btn-favourite.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #495057;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.btn-favourite.is-favourite {
    background-color: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.btn-favourite.is-favourite:hover {
    background-color: #ffe69c;
    border-color: #ffc107;
    color: #856404;
}

.favourite-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    line-height: 18px;
    font-size: 18px;
    transition: transform 0.2s ease;
}

.btn-favourite:hover .favourite-icon {
    transform: scale(1.1);
}

.btn-favourite.is-favourite .favourite-icon {
    color: #ff6b6b;
}

/* Heart icon styles - using Font Awesome or similar icon font */
.icon-heart::before {
    content: '\f004'; /* Font Awesome heart */
    font-family: 'Font Awesome 5 Free', 'Font Awesome 5 Pro', 'FontAwesome';
    font-weight: 900;
}

.icon-heart-empty::before {
    content: '\f08a'; /* Font Awesome heart-o */
    font-family: 'Font Awesome 5 Free', 'Font Awesome 5 Pro', 'FontAwesome';
    font-weight: 400;
}

/* Alternative: Using Unicode characters if Font Awesome is not available */
.icon-heart::before {
    content: '♥';
    font-family: Arial, sans-serif;
}

.icon-heart-empty::before {
    content: '♡';
    font-family: Arial, sans-serif;
}

.favourite-text {
    font-size: 14px;
    line-height: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .btn-favourite {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .favourite-icon {
        width: 16px;
        height: 16px;
        font-size: 16px;
    }
}

/* Integration with common Joomla templates */
.item-page .btn-favourite,
.article-view .btn-favourite,
.submission-view .btn-favourite {
    margin-bottom: 20px;
}

/* Share link button style */
.btn-share-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: #0d6efd;
    border: 1px solid #0d6efd;
    border-radius: 4px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    margin: 0;
}

.btn-share-link:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    color: #ffffff;
    text-decoration: none;
}

.btn-share-link:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

.share-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    line-height: 18px;
    font-size: 18px;
}

.icon-link::before {
    content: '🔗';
    font-family: Arial, sans-serif;
}

.share-text {
    font-size: 14px;
    line-height: 1;
}
