/**
 * CompUNITY Social Referrals CSS
 * Version: 1.2.3
 */

/* Main Widget Container */
.csr-widget {
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin: 20px 0;
}

.csr-info {
    margin-bottom: 20px;
    padding: 15px;
    background: #e3f2fd;
    border-radius: 3px;
    text-align: center;
}

/* Button Grid */
.csr-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

/* Share Links/Buttons - Works for both <a> and <button> elements */
.csr-btn,
.csr-share-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 20px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    color: #333;
    box-sizing: border-box;
}

.csr-btn:hover,
.csr-share-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    text-decoration: none;
    color: #333;
}

.csr-btn:focus,
.csr-share-link:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Icon Container */
.csr-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.csr-icon svg {
    width: 20px;
    height: 20px;
}

/* Platform-specific Styling */
.csr-linkedin {
    border-left: 4px solid #0077b5;
}

.csr-linkedin:hover {
    background: #f0f8ff;
}

.csr-linkedin .csr-icon {
    color: #0077b5;
}

.csr-facebook {
    border-left: 4px solid #1877f2;
}

.csr-facebook:hover {
    background: #f0f6ff;
}

.csr-facebook .csr-icon {
    color: #1877f2;
}

.csr-x {
    border-left: 4px solid #000;
}

.csr-x:hover {
    background: #f5f5f5;
}

.csr-x .csr-icon {
    color: #000;
}

.csr-instagram {
    border-left: 4px solid #e4405f;
}

.csr-instagram:hover {
    background: #fff0f3;
}

.csr-instagram .csr-icon {
    color: #e4405f;
}

/* Feedback Messages */
.csr-feedback,
#csr-feedback {
    margin-top: 20px;
}

.csr-success {
    padding: 15px;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 5px;
    text-align: center;
}

.csr-error {
    padding: 15px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    text-align: center;
}

.csr-loading {
    padding: 15px;
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    border-radius: 5px;
    text-align: center;
}

/* User Referrals Table */
.csr-referrals {
    margin: 20px 0;
}

.csr-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.csr-table th,
.csr-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.csr-table th {
    background: #f5f5f5;
    font-weight: bold;
}

/* Status Badges */
.status-approved {
    color: #155724;
    background: #d4edda;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.status-pending {
    color: #856404;
    background: #fff3cd;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
}

/* Login Prompt */
.csr-login {
    padding: 20px;
    background: #f0f0f0;
    border-left: 4px solid #0073aa;
    margin: 20px 0;
}

.csr-login a {
    color: #0073aa;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .csr-buttons {
        grid-template-columns: 1fr;
    }
    
    .csr-btn,
    .csr-share-link {
        padding: 12px 15px;
        font-size: 14px;
    }
}

/* Legacy Support for older widget class names */
.csr-social-share-widget {
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin: 20px 0;
}

.csr-share-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.csr-share-btn {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    color: #333;
}

.csr-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.csr-share-linkedin { border-left: 3px solid #0077b5; }
.csr-share-facebook { border-left: 3px solid #1877f2; }
.csr-share-x { border-left: 3px solid #000; }
.csr-share-instagram { border-left: 3px solid #e4405f; }
