/* Giveaways Styling */

/* Sharing Analytics Page Styles */
.sg-analytics-dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.sg-analytics-card {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

.sg-analytics-card .hndle {
    background: #f8f9f9;
    border-bottom: 1px solid #ccd0d4;
    padding: 12px 16px;
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #1e1e1e;
}

.sg-analytics-card .inside {
    padding: 16px;
}

.sg-analytics-stats {
    display: grid;
    gap: 12px;
}

.sg-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.sg-stat-item:last-child {
    border-bottom: none;
}

.sg-stat-label {
    font-weight: 500;
    color: #3c434e;
}

.sg-stat-value {
    font-weight: 700;
    color: #1e1e1e;
    font-size: 16px;
}

.sg-analytics-table {
    margin-top: 12px;
}

.sg-analytics-table .widefat {
    border: 1px solid #ccd0d4;
    border-radius: 4px;
}

.sg-analytics-table .widefat th {
    background: #f8f9f9;
    font-weight: 600;
    color: #3c434e;
    border-bottom: 1px solid #ccd0d4;
}

.sg-analytics-table .widefat td {
    padding: 8px 12px;
    vertical-align: middle;
}

.sg-referrer-section {
    margin-top: 30px;
}

.sg-funnel-section {
    margin-top: 30px;
}

.sg-funnel-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.sg-funnel-item {
    background: #f8f9f9;
    padding: 16px;
    border-radius: 6px;
    border-left: 4px solid #2271b1;
}

.sg-funnel-item strong {
    display: block;
    font-size: 18px;
    color: #1e1e1e;
    margin-bottom: 4px;
}

.sg-funnel-item .percentage {
    color: #2271b1;
    font-weight: 600;
}

.sg-recent-activity {
    margin-top: 30px;
}

.sg-recent-activity .widefat {
    margin-top: 12px;
}

.sg-no-data {
    text-align: center;
    padding: 40px 20px;
    color: #646970;
    font-style: italic;
}

.sg-pagination {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.sg-pagination .tablenav-pages {
    display: flex;
    gap: 8px;
    align-items: center;
}

.sg-pagination .page-numbers {
    padding: 6px 12px;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    text-decoration: none;
    color: #3c434e;
}

.sg-pagination .page-numbers.current {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

.sg-pagination .page-numbers:hover {
    background: #f8f9f9;
}

@media (max-width: 768px) {
    .sg-analytics-dashboard {
        grid-template-columns: 1fr;
    }
    
    .sg-funnel-stats {
        grid-template-columns: 1fr;
    }
}

/* Frontend Form Error Improvements */
.sg-notice-error {
    background: #fef2f2;
    border: 2px solid #dc2626;
    color: #dc2626;
    font-weight: 600;
    text-align: center;
    padding: 16px 20px;
    border-radius: 8px;
    margin: 0 0 20px 0;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15);
    position: relative;
    animation: sg-error-pulse 0.5s ease-in-out;
}

@keyframes sg-error-pulse {
    0% { transform: scale(0.95); opacity: 0; }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); opacity: 1; }
}

.sg-entry-field input.sg-error-field {
    border-color: #dc2626 !important;
    border-width: 2px !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
    background-color: #fef2f2 !important;
}

.sg-entry-field input.sg-error-field:focus {
    outline: none !important;
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2) !important;
}

.sg-entry-field input.sg-error-field:hover {
    border-color: #b91c1c !important;
}