/* Public-facing styles for GreenMetrics */
.greenmetrics-badge-wrapper {
    position: relative;
    display: inline-block;
    z-index: 1000;
}

.greenmetrics-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 4px;
    background-color: #4CAF50;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.greenmetrics-badge .leaf-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
    flex-shrink: 0;
}

.greenmetrics-badge span {
    white-space: nowrap;
}

.greenmetrics-content {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 320px;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    background-color: #ffffff;
    backdrop-filter: blur(10px);
    color: #333333;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    z-index: 1000;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.greenmetrics-badge-wrapper:hover .greenmetrics-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.greenmetrics-content h3 {
    margin: 0 0 20px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 12px;
}

.greenmetrics-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.greenmetrics-metric,
.greenmetrics-global-badge-metric {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.greenmetrics-metric:hover,
.greenmetrics-global-badge-metric:hover {
    background-color: #f3f4f6;
}

.greenmetrics-metric-label,
.greenmetrics-global-badge-metric-label {
    color: #666;
    font-size: 15px;
}

.greenmetrics-metric-value,
.greenmetrics-global-badge-metric-value {
    font-weight: 500;
    color: #4CAF50;
    font-size: 15px;
    background: rgba(0, 0, 0, 0.04);
    padding: 4px 8px;
    border-radius: 4px;
}

/* Position variations */
.greenmetrics-badge-wrapper.bottom-right {
    position: fixed;
    bottom: 20px;
    right: 20px;
}

.greenmetrics-badge-wrapper.bottom-right .greenmetrics-content {
    bottom: calc(100% + 8px);
    top: auto;
    left: auto;
    right: 0;
}

/* Theme variations */
.greenmetrics-badge.light {
    background-color: #ffffff;
    color: #4CAF50;
    border: 1px solid #4CAF50;
}

.greenmetrics-badge.dark {
    background-color: #333333;
    color: #ffffff;
}

/* Size variations */
.greenmetrics-badge.small {
    padding: 4px 8px;
    font-size: 12px;
}

.greenmetrics-badge.small .leaf-icon {
    width: 16px;
    height: 16px;
}

.greenmetrics-badge.medium {
    padding: 8px 16px;
    font-size: 14px;
}

.greenmetrics-badge.medium .leaf-icon {
    width: 20px;
    height: 20px;
}

.greenmetrics-badge.large {
    padding: 12px 24px;
    font-size: 16px;
}

.greenmetrics-badge.large .leaf-icon {
    width: 24px;
    height: 24px;
}

/* Responsive design */
@media screen and (max-width: 600px) {
    .greenmetrics-badge {
        font-size: 10px;
        padding: 6px 10px;
    }

    .greenmetrics-badge .leaf-icon {
        width: 12px;
        height: 12px;
    }

    .greenmetrics-content {
        min-width: 200px;
        padding: 16px;
    }

    .greenmetrics-metrics {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* Global Badge Styles */
.greenmetrics-global-badge {
    position: fixed;
    z-index: 1000;
}

/* Position variations for global badge */
.greenmetrics-global-badge.bottom-right {
    bottom: 20px;
    right: 20px;
}

.greenmetrics-global-badge.bottom-left {
    bottom: 20px;
    left: 20px;
}

.greenmetrics-global-badge.top-right {
    top: 20px;
    right: 20px;
}

.greenmetrics-global-badge.top-left {
    top: 20px;
    left: 20px;
}

/* Global badge wrapper - copy of shortcode styles with prefixed class names */
.greenmetrics-global-badge-wrapper {
    position: relative;
    display: inline-block;
    z-index: 1000;
}

.greenmetrics-global-badge-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.greenmetrics-global-badge-button .icon-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.greenmetrics-global-badge-button .icon-container svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
    display: block;
}

.greenmetrics-global-badge-button:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.greenmetrics-global-badge-button .leaf-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
    flex-shrink: 0;
}

.greenmetrics-global-badge-button span {
    white-space: nowrap;
}

.greenmetrics-global-badge-content {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 320px;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    background-color: #ffffff;
    backdrop-filter: blur(10px);
    color: #333333;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    z-index: 1000;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.greenmetrics-global-badge-wrapper:hover .greenmetrics-global-badge-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.greenmetrics-global-badge-content h3 {
    margin: 0 0 20px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 12px;
}

.greenmetrics-global-badge-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.greenmetrics-global-badge-metric {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 12px;
    transition: all 0.2s ease;
}

/* Hover styles now added dynamically in PHP */

.greenmetrics-global-badge-metric-label {
    color: #666;
    font-size: 15px;
}

.greenmetrics-global-badge-metric-value {
    font-weight: 500;
    color: #4CAF50;
    font-size: 15px;
    background: rgba(0, 0, 0, 0.04);
    padding: 4px 8px;
    border-radius: 4px;
}

/* Size variations for global badge */
.greenmetrics-global-badge-button.small {
    padding: 4px 8px;
    font-size: 12px;
}

.greenmetrics-global-badge-button.small .leaf-icon {
    width: 16px;
    height: 16px;
}

.greenmetrics-global-badge-button.medium {
    padding: 8px 16px;
    font-size: 14px;
}

.greenmetrics-global-badge-button.medium .leaf-icon {
    width: 20px;
    height: 20px;
}

.greenmetrics-global-badge-button.large {
    padding: 12px 24px;
    font-size: 16px;
}

.greenmetrics-global-badge-button.large .leaf-icon {
    width: 24px;
    height: 24px;
}

/* Global badge popover positioning */
.greenmetrics-global-badge.bottom-right .greenmetrics-global-badge-content,
.greenmetrics-global-badge.bottom-left .greenmetrics-global-badge-content {
    bottom: calc(100% + 8px);
    top: auto;
}

.greenmetrics-global-badge.top-right .greenmetrics-global-badge-content,
.greenmetrics-global-badge.top-left .greenmetrics-global-badge-content {
    top: calc(100% + 8px);
    bottom: auto;
}

.greenmetrics-global-badge.bottom-right .greenmetrics-global-badge-content,
.greenmetrics-global-badge.top-right .greenmetrics-global-badge-content {
    right: 0;
    left: auto;
}

.greenmetrics-global-badge.bottom-left .greenmetrics-global-badge-content,
.greenmetrics-global-badge.top-left .greenmetrics-global-badge-content {
    left: 0;
    right: auto;
}

/* Responsive design for global badge */
@media screen and (max-width: 600px) {
    .greenmetrics-global-badge-button {
        font-size: 10px;
        padding: 6px 10px;
    }

    .greenmetrics-global-badge-button .leaf-icon {
        width: 12px;
        height: 12px;
    }

    .greenmetrics-global-badge-content {
        min-width: 200px;
        padding: 16px;
    }

    .greenmetrics-global-badge-metrics {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* Responsive adjustments */
@media screen and (max-width: 480px) {
    .greenmetrics-metrics,
    .greenmetrics-global-badge-metrics {
        grid-template-columns: 1fr;
    }

    .greenmetrics-content,
    .greenmetrics-global-badge-content {
        min-width: 280px;
        padding: 16px;
    }

    .greenmetrics-metric,
    .greenmetrics-global-badge-metric {
        padding: 12px;
        gap: 8px;
    }

    .greenmetrics-metric-label,
    .greenmetrics-global-badge-metric-label,
    .greenmetrics-metric-value,
    .greenmetrics-global-badge-metric-value {
        font-size: 14px;
    }
}

/* Global Badge Dynamic Hover Styles */
.greenmetrics-global-badge-wrapper .greenmetrics-global-badge-content .greenmetrics-global-badge-metrics .greenmetrics-global-badge-metric:hover {
	background-color: var(--hover-bg-color, #f3f4f6) !important;
	transition: background-color 0.2s ease !important;
}

.greenmetrics-global-badge-button .icon-container svg {
	width: var(--icon-size, 20px);
	height: var(--icon-size, 20px);
	fill: currentColor;
	display: block;
}

/* Additional styles for the Gutenberg block */
/* Remove CSS variable approach since we're now using direct inline styles */

/* Simple font family classes that can be used directly */
.font-arial { font-family: Arial, sans-serif; }
.font-helvetica { font-family: Helvetica, Arial, sans-serif; }
.font-georgia { font-family: Georgia, serif; }
.font-times { font-family: "Times New Roman", Times, serif; }
.font-verdana { font-family: Verdana, Geneva, sans-serif; }
.font-system { font-family: system-ui, sans-serif; }
.font-tahoma { font-family: Tahoma, Geneva, sans-serif; }
.font-trebuchet { font-family: "Trebuchet MS", sans-serif; }
.font-courier { font-family: "Courier New", monospace; }
.font-palatino { font-family: Palatino, serif; }
.font-garamond { font-family: Garamond, serif; }
.font-century { font-family: "Century Gothic", sans-serif; }
.font-sans { font-family: sans-serif; }
.font-serif { font-family: serif; }
.font-mono { font-family: monospace; }

