/* css/bug-reporting.css - Bug Reporting System Styles */

/* Bug Report Button in Game Controls */
.bug-report-button {
    /* Copy exact dimensions from existing control buttons */
    padding: 15px 24px !important;  /* Increased padding to match height */
    font-size: 1em !important;
    font-weight: bold !important;
    border-radius: 15px !important;  /* Match the rounded corners */
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    
    /* Ensure consistent sizing */
    min-height: 60px !important;  /* Match the height of other buttons */
    box-sizing: border-box !important;
    display: inline-block !important;
    text-align: center !important;
    vertical-align: middle !important;
    line-height: 1.2 !important;
    
    /* Make it flex to match other buttons */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    
    /* Unique bug button styling */
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    border: 2px solid #f59e0b !important;
    color: white !important;
    
    /* Ensure it takes full width like others */
    width: 100% !important;
    margin-top: 10px !important;
}

.bug-report-button::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #f59e0b, #d97706, #f59e0b);
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bug-report-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

.bug-report-button:hover::before {
    opacity: 1;
}

/* Bug Report Modal */
.bug-report-modal {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    animation: bugModalFadeIn 0.3s ease-out;
}

@keyframes bugModalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(5px);
    }
}

.bug-report-content {
    animation: bugModalSlideIn 0.4s ease-out;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

@keyframes bugModalSlideIn {
    from {
        transform: translateY(-50px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Bug Report Header */
.bug-report-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.close-bug-report {
    transition: all 0.2s ease;
    font-weight: bold;
}

.close-bug-report:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    transform: scale(1.1);
}

/* Form Styling */
.bug-report-form {
    background: #fafafa;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.05), transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(217, 119, 6, 0.03), transparent 50%);
}

.form-section {
    transition: all 0.3s ease;
}

.form-section:focus-within {
    transform: translateY(-2px);
}

/* Enhanced Input Styling */
.bug-report-form input,
.bug-report-form select,
.bug-report-form textarea {
    transition: all 0.3s ease;
    font-family: inherit;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.bug-report-form input:focus,
.bug-report-form select:focus,
.bug-report-form textarea:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 
        0 0 0 3px rgba(245, 158, 11, 0.1),
        0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* Select Dropdown Styling */
.bug-report-form select {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    appearance: none;
    cursor: pointer;
}

/* Checkbox Styling */
.bug-report-form input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #f59e0b;
    cursor: pointer;
}

/* Button Styling */
.bug-report-actions button {
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 1em;
    position: relative;
    overflow: hidden;
}

.bug-report-actions button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.6s ease;
}

.bug-report-actions button:hover::before {
    width: 300px;
    height: 300px;
}

.bug-report-actions button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.bug-report-actions button:active {
    transform: translateY(0);
}

.cancel-bug-report:hover {
    background: #4b5563 !important;
}

.submit-bug-report:hover:not(:disabled) {
    background: linear-gradient(135deg, #d97706, #b45309) !important;
}

.submit-bug-report:disabled {
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Status Messages */
.bug-report-status {
    border-radius: 8px;
    border: 1px solid transparent;
    animation: statusFadeIn 0.3s ease-out;
    line-height: 1.5;
}

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

/* Success Status */
.bug-report-status[style*="rgb(16, 185, 129)"] {
    border-color: #10b981;
}

/* Error Status */
.bug-report-status[style*="rgb(220, 38, 38)"] {
    border-color: #dc2626;
}

/* Info Status */
.bug-report-status[style*="rgb(2, 132, 199)"] {
    border-color: #0284c7;
}

/* Loading Animation */
.submit-bug-report:disabled:contains("Submitting") {
    position: relative;
}

.submit-bug-report:disabled:contains("Submitting")::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: bugReportSpinner 0.8s linear infinite;
}

@keyframes bugReportSpinner {
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .bug-report-content {
        width: 95% !important;
        max-height: 90vh !important;
        margin: 20px 0;
    }
    
    .bug-report-header {
        padding: 15px !important;
    }
    
    .bug-report-header h2 {
        font-size: 1.3em;
    }
    
    .bug-report-form {
        padding: 20px !important;
    }
    
    .form-section {
        margin-bottom: 15px !important;
    }
    
    .bug-report-actions {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .bug-report-actions button {
        width: 100%;
        padding: 14px 20px !important;
    }
}

@media (max-width: 480px) {
    .bug-report-content {
        width: 100% !important;
        height: 100% !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
    }
    
    .bug-report-header {
        border-radius: 0 !important;
    }
    
    .bug-report-form input,
    .bug-report-form select,
    .bug-report-form textarea {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Dark Mode Support (if you add it later) */
@media (prefers-color-scheme: dark) {
    .bug-report-content {
        background: #1f2937 !important;
        color: #f9fafb;
    }
    
    .bug-report-form {
        background: #111827 !important;
    }
    
    .bug-report-form input,
    .bug-report-form select,
    .bug-report-form textarea {
        background: #374151 !important;
        border-color: #4b5563 !important;
        color: #f9fafb !important;
    }
    
    .bug-report-form input:focus,
    .bug-report-form select:focus,
    .bug-report-form textarea:focus {
        border-color: #f59e0b !important;
        box-shadow: 
            0 0 0 3px rgba(245, 158, 11, 0.2),
            0 4px 12px rgba(0, 0, 0, 0.3) !important;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    .bug-report-modal,
    .bug-report-content,
    .bug-report-status,
    .form-section,
    .bug-report-actions button {
        animation: none !important;
        transition: none !important;
    }
    
    .bug-report-actions button:hover,
    .form-section:focus-within {
        transform: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .bug-report-form input,
    .bug-report-form select,
    .bug-report-form textarea {
        border-width: 3px !important;
    }
    
    .bug-report-actions button {
        border: 3px solid !important;
    }
}