/* Golf Genius Plugin Styles */

.golf-genius-container {
    margin: 20px 0;
}

.golf-genius-controls {
    margin-bottom: 20px;
    text-align: center;
}

.golf-genius-load-btn {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.golf-genius-load-btn:hover {
    background-color: #005a87;
}

.golf-genius-load-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.golf-genius-loading {
    text-align: center;
    padding: 20px;
    font-style: italic;
    color: #666;
}

.golf-genius-loading::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.golf-genius-error {
    background-color: #ffeaea;
    border: 1px solid #ff6b6b;
    border-radius: 4px;
    padding: 15px;
    margin: 10px 0;
    color: #d63031;
}

.golf-genius-content {
    margin-top: 20px;
}

.golf-genius-iframe {
    width: 100%;
    display: block;
    margin-bottom: 20px;
}

/* Enhanced Widget Styles */
.golfgenius-widget-output {
    position: relative;
    width: 100%;
    margin: 0;
}

.gg-page-iframe {
    width: 100%;
    border: none;
    background: transparent;
    transition: height 0.3s ease-in-out;
    display: block;
}

/* Loading overlay styles */
.gg-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 4px;
    min-height: 200px;
}

.gg-loading-overlay p {
    font-size: 16px;
    color: #666;
    margin: 0;
    padding: 20px;
    text-align: center;
}

.gg-loading-overlay::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

/* Debug info styles */
.gg-debug-info {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 10px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    line-height: 1.4;
    color: #495057;
}

.gg-debug-info strong {
    color: #212529;
    font-weight: 600;
}

.gg-current-height {
    color: #007cba;
    font-weight: 500;
}

/* Error styles */
.gg-widget-error {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 6px;
    padding: 16px;
    margin: 10px 0;
    color: #c53030;
    font-size: 14px;
    line-height: 1.5;
}

.gg-widget-error p {
    margin: 0;
}

.gg-widget-error a {
    color: #c53030;
    text-decoration: underline;
}

.gg-widget-error a:hover {
    color: #9c2626;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .golfgenius-widget-output {
        margin: 10px 0;
    }
    
    .gg-page-iframe {
        min-height: 300px;
    }
    
    .gg-debug-info {
        font-size: 10px;
        padding: 8px;
    }
}

/* Animation for height changes */
.gg-page-iframe.height-animating {
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loading state for iframe */
.gg-page-iframe[data-loading="true"] {
    opacity: 0.7;
    pointer-events: none;
}

/* Smooth reveal animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.golfgenius-widget-output.loaded .gg-page-iframe {
    animation: fadeInUp 0.6s ease-out;
}

/* Focus styles for accessibility */
.gg-page-iframe:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .gg-debug-info,
    .gg-loading-overlay {
        display: none !important;
    }
    
    .gg-page-iframe {
        height: auto !important;
        page-break-inside: avoid;
    }
}