/**
 * Georgian Fonts Admin Dashboard Widget Styles
 * File: assets/css/admin-widget.css
 */

/* Widget Container */
.gf-dashboard-widget-container {
    margin: -12px -12px 0 -12px;
}

.gf-widget-item {
    padding: 15px;
    margin-bottom: 12px;
    background: #fff;
    border-left: 4px solid #4361ee;
    position: relative;
}

.gf-widget-item:last-child {
    margin-bottom: 0;
}

/* Widget Types */
.gf-widget-type-announcement {
    background: #f8f9fa;
}

.gf-widget-type-stats {
    background: #fff;
}

/* Priority Styling */
.gf-priority-high {
    border-left-color: #f72585;
}

.gf-priority-medium {
    border-left-color: #f8961e;
}

.gf-priority-low {
    border-left-color: #4cc9f0;
}

/* Dismiss Button */
.gf-dismiss-widget {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #a0a5aa;
    cursor: pointer;
    padding: 2px;
    width: 20px;
    height: 20px;
    border-radius: 3px;
    transition: all 0.2s;
}

.gf-dismiss-widget:hover {
    background: #f0f0f1;
    color: #2c3338;
}

.gf-dismiss-widget .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
}

/* Content Styles */
.gf-widget-content {
    line-height: 1.6;
    color: #3c434a;
}

.gf-widget-content h1,
.gf-widget-content h2,
.gf-widget-content h3,
.gf-widget-content h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #1d2327;
}

.gf-widget-content h3 {
    font-size: 15px;
    font-weight: 600;
}

.gf-widget-content p {
    margin: 0 0 10px;
}

.gf-widget-content a {
    color: #2271b1;
    text-decoration: none;
}

.gf-widget-content a:hover {
    color: #135e96;
    text-decoration: underline;
}

.gf-widget-content ul,
.gf-widget-content ol {
    margin: 10px 0;
    padding-left: 20px;
}

.gf-widget-content li {
    margin-bottom: 5px;
}

/* Image Widget */
.gf-widget-image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
}

.gf-widget-caption {
    margin-top: 10px;
    font-size: 13px;
    color: #646970;
    font-style: italic;
}

/* Feed Widget */
.gf-widget-feed {
    padding: 0;
}

.gf-feed-intro {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #dcdcde;
    color: #50575e;
}

.gf-feed-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.gf-feed-list li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f1;
}

.gf-feed-list li:last-child {
    border-bottom: none;
}

.gf-feed-list a {
    color: #1d2327;
    text-decoration: none;
    display: block;
    transition: all 0.2s;
}

.gf-feed-list a:hover {
    color: #2271b1;
}

.gf-feed-list strong {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 600;
}

.gf-feed-list p {
    margin: 0;
    font-size: 12px;
    color: #646970;
    line-height: 1.5;
}

/* Announcement Widget */
.gf-announcement {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.gf-announcement-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #4361ee;
    color: #fff;
}

.gf-announcement-icon .dashicons {
    width: 20px;
    height: 20px;
    font-size: 20px;
}

.gf-announcement-content {
    flex: 1;
}

.gf-announcement h3 {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 600;
    color: #1d2327;
}

.gf-announcement-text {
    margin-bottom: 12px;
    color: #3c434a;
    line-height: 1.6;
}

.gf-announcement .button {
    margin-top: 5px;
}

/* Color Variants */
.gf-color-blue .gf-announcement-icon {
    background: #4361ee;
}

.gf-color-green .gf-announcement-icon {
    background: #059669;
}

.gf-color-orange .gf-announcement-icon {
    background: #f8961e;
}

.gf-color-red .gf-announcement-icon {
    background: #f72585;
}

.gf-color-purple .gf-announcement-icon {
    background: #7c3aed;
}

/* Stats Widget */
.gf-stats-widget h3 {
    margin: 0 0 15px;
    font-size: 15px;
    font-weight: 600;
    color: #1d2327;
}

.gf-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.gf-stat-item {
    text-align: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 4px;
}

.gf-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #4361ee;
    margin-bottom: 4px;
}

.gf-stat-label {
    font-size: 12px;
    color: #646970;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gf-stats-footer {
    padding-top: 12px;
    border-top: 1px solid #dcdcde;
    font-size: 13px;
    color: #646970;
}

/* Default Content */
.gf-default-content {
    text-align: center;
    padding: 20px;
}

.gf-default-icon {
    margin-bottom: 15px;
}

.gf-default-icon .dashicons {
    width: 48px;
    height: 48px;
    font-size: 48px;
    color: #4361ee;
}

.gf-default-content h3 {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
}

.gf-default-content p {
    margin: 0 0 15px;
    color: #646970;
}

.gf-quick-info {
    margin: 15px 0;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 4px;
}

.gf-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #3c434a;
    font-size: 13px;
}

.gf-info-item .dashicons {
    color: #4361ee;
}

.gf-actions {
    margin: 15px 0 0;
}

/* Footer */
.gf-dashboard-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin: 0 -12px -12px;
    border-top: 1px solid #dcdcde;
    background: #f8f9fa;
}

.gf-refresh-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
}

.gf-refresh-btn .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
}

.gf-refresh-btn.refreshing .dashicons {
    animation: gf-spin 1s linear infinite;
}

.gf-last-updated {
    font-size: 12px;
    color: #646970;
}

@keyframes gf-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Loading State */
.gf-widget-loading {
    text-align: center;
    padding: 30px;
    color: #646970;
}

.gf-widget-loading::before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #dcdcde;
    border-top-color: #4361ee;
    border-radius: 50%;
    animation: gf-spin 0.8s linear infinite;
    margin-bottom: 10px;
}

/* Button Styles */
.gf-widget-item .button {
    font-size: 13px;
    height: auto;
    padding: 6px 12px;
}

.gf-widget-item .button-primary {
    background: #4361ee;
    border-color: #4361ee;
}

.gf-widget-item .button-primary:hover {
    background: #3a56d4;
    border-color: #3a56d4;
}

/* Responsive */
@media screen and (max-width: 782px) {
    .gf-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .gf-announcement {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* Animation */
.gf-widget-item {
    animation: gf-fadeIn 0.3s ease-in-out;
}

@keyframes gf-fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .gf-widget-item {
        border-width: 2px;
    }
}

/* Dark Mode (if WP adds support) */
@media (prefers-color-scheme: dark) {
    .gf-widget-item {
        background: #1e1e1e;
        color: #e4e4e4;
    }
    
    .gf-widget-content,
    .gf-announcement-text {
        color: #e4e4e4;
    }
    
    .gf-stat-item {
        background: #2a2a2a;
    }
}

/* Custom Scrollbar (for long content) */
.gf-widget-content::-webkit-scrollbar {
    width: 8px;
}

.gf-widget-content::-webkit-scrollbar-track {
    background: #f0f0f1;
}

.gf-widget-content::-webkit-scrollbar-thumb {
    background: #c3c4c7;
    border-radius: 4px;
}

.gf-widget-content::-webkit-scrollbar-thumb:hover {
    background: #a0a5aa;
}