/**
 * Frontend styles for YITH Affiliate Custom Shares
 */

/* Share buttons */
.yacs-share-buttons {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.yacs-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: all 0.3s ease;
}

.yacs-share-btn:hover {
    background-color: #e0e0e0;
    border-color: #999;
}

.yacs-share-btn.copied {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.yacs-copy-btn {
    background-color: #007bff;
    color: white;
    border-color: #0056b3;
}

.yacs-copy-btn:hover {
    background-color: #0056b3;
    border-color: #003d82;
}

.yacs-copy-btn.copied {
    background-color: #28a745;
    border-color: #1e7e34;
    color: white;
}

/* Notices */
.yacs-notice {
    padding: 12px 15px;
    margin: 15px 0;
    background-color: #f8f9fa;
    border-left: 4px solid #0073aa;
    border-radius: 3px;
    color: #333;
}

.yacs-notice.warning {
    background-color: #fff8e5;
    border-left-color: #ffb81c;
}

.yacs-notice.error {
    background-color: #fee;
    border-left-color: #dc3545;
    color: #dc3545;
}

.yacs-notice.success {
    background-color: #d4edda;
    border-left-color: #28a745;
    color: #155724;
}

/* Stats container */
.yacs-stats-container {
    margin: 20px 0;
}

.yacs-stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

.yacs-stats-header h2 {
    margin: 0;
    font-size: 24px;
}

.yacs-stats-period-filter {
    display: flex;
    gap: 10px;
}

.yacs-stats-period-filter a {
    padding: 8px 12px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-decoration: none;
    color: #0073aa;
    transition: all 0.3s ease;
}

.yacs-stats-period-filter a.active {
    background-color: #0073aa;
    color: white;
    border-color: #0073aa;
}

.yacs-stats-period-filter a:hover {
    background-color: #e9ecef;
}

/* Stats grid */
.yacs-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.yacs-stat-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.yacs-stat-card:hover {
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    border-color: #0073aa;
}

.yacs-stat-card-value {
    font-size: 32px;
    font-weight: bold;
    color: #0073aa;
    margin: 10px 0;
}

.yacs-stat-card-label {
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Platform stats table */
.yacs-platform-stats {
    width: 100%;
    margin-bottom: 30px;
}

.yacs-platform-stats table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.yacs-platform-stats th {
    background-color: #f5f5f5;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #e0e0e0;
}

.yacs-platform-stats td {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
}

.yacs-platform-stats tbody tr:hover {
    background-color: #f9f9f9;
}

.yacs-platform-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-right: 8px;
    vertical-align: middle;
}

.yacs-platform-name {
    font-weight: 500;
}

/* Admin styles */
.yacs-admin-container {
    max-width: 1200px;
    margin: 0 auto;
}

.yacs-affiliate-list {
    margin-top: 20px;
}

.yacs-affiliate-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.yacs-affiliate-item:hover {
    border-color: #0073aa;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.yacs-affiliate-info {
    flex-grow: 1;
}

.yacs-affiliate-name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 5px;
}

.yacs-affiliate-email {
    font-size: 14px;
    color: #666;
}

.yacs-affiliate-stats-inline {
    display: flex;
    gap: 30px;
    margin-top: 10px;
}

.yacs-affiliate-stat {
    display: flex;
    align-items: center;
    gap: 8px;
}

.yacs-affiliate-stat-label {
    font-size: 13px;
    color: #999;
}

.yacs-affiliate-stat-value {
    font-size: 18px;
    font-weight: bold;
    color: #0073aa;
}

.yacs-affiliate-action {
    display: flex;
    gap: 8px;
}

.yacs-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.yacs-btn-primary {
    background-color: #0073aa;
    color: white;
}

.yacs-btn-primary:hover {
    background-color: #005a87;
}

.yacs-btn-secondary {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
}

.yacs-btn-secondary:hover {
    background-color: #e0e0e0;
}

/* Responsive */
@media (max-width: 768px) {
    .yacs-stats-grid {
        grid-template-columns: 1fr;
    }

    .yacs-stats-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .yacs-affiliate-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .yacs-affiliate-action {
        width: 100%;
        margin-top: 10px;
    }

    .yacs-share-buttons {
        flex-direction: column;
    }

    .yacs-share-btn {
        width: 100%;
    }
}
