/* ============================================
   WE ÖTZI - FEEDBACK SYSTEM (BAUHAUS)
   ============================================ */

/* Local variable definitions for standalone use */
:root {
    --feedback-space-sm: 8px;
    --feedback-space-md: 16px;
    --feedback-space-lg: 24px;
}

/* Floating Trigger Button */
.feedback-trigger {
    position: fixed;
    bottom: calc(var(--footer-height, 60px) + 20px);
    right: 2rem;
    width: 56px;
    height: 56px;
    background: var(--fg);
    color: var(--bg);
    border: var(--border-width) solid var(--fg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: all var(--transition);
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.2);
    animation: feedbackPulse 2s ease-in-out infinite;
}

/* Subtle pulse animation for feedback button */
@keyframes feedbackPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.2);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.25);
    }
}

.feedback-trigger:hover {
    background: var(--primary-red);
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.2);
    animation: none;
}

.feedback-trigger svg {
    transition: transform var(--transition);
}

.feedback-trigger:hover svg {
    transform: rotate(15deg);
}

/* Feedback Tooltip */
.feedback-tooltip {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 12px;
    background: var(--fg);
    color: var(--bg);
    padding: 12px 16px;
    font-family: var(--font-technical);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    white-space: nowrap;
    border: var(--border-width) solid var(--fg);
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    max-width: 250px;
    white-space: normal;
    text-align: right;
    line-height: 1.4;
}

.feedback-tooltip::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 18px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 10px solid var(--fg);
}

.feedback-tooltip.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.feedback-tooltip.fade-out {
    opacity: 0;
    transform: translateY(-10px);
}

/* Modal Overlay */
.feedback-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    padding: 20px;
}

.feedback-modal.active {
    opacity: 1;
    visibility: visible;
}

/* Container */
.feedback-container {
    background: var(--bg);
    border: var(--border-width) solid var(--fg);
    width: 100%;
    max-width: 500px;
    padding: 3rem 2.5rem;
    position: relative;
    transform: translateY(20px);
    transition: transform var(--transition);
    box-shadow: 10px 10px 0px var(--fg);
}

.feedback-modal.active .feedback-container {
    transform: translateY(0);
}

/* Close Button */
.feedback-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--fg);
    cursor: pointer;
    padding: 5px;
    transition: color var(--transition);
}

.feedback-close:hover {
    color: var(--primary-red);
}

/* Header */
.feedback-header {
    margin-bottom: var(--feedback-space-lg);
    border-bottom: var(--border-width) solid var(--fg);
    padding-bottom: var(--feedback-space-md);
}

.feedback-title {
    font-family: var(--font-primary);
    font-weight: 900;
    font-size: 1.5rem;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.feedback-subtitle {
    font-family: var(--font-technical);
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   FEEDBACK FORM COMPONENT STANDARDS
   Standard spacing and styling rules for all 
   feedback form elements. These ensure visual
   consistency across all feedback components.
   ============================================ */

/* Form Groups - Base container for each field */
.feedback-form-group {
    margin-bottom: var(--feedback-space-md);
}

/* Labels - Standard spacing: 10px top margin for visual separation */
.feedback-form-group label {
    display: block;
    font-family: var(--font-technical);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-top: 10px;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

/* First label doesn't need top margin (follows header directly) */
.feedback-form-group:first-of-type label {
    margin-top: 0;
}

/* Input Fields - Standard: 12px padding for comfortable input area */
.feedback-select,
.feedback-textarea {
    width: 100%;
    background: transparent;
    border: var(--border-width) solid var(--fg);
    padding: 12px;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    outline: none;
    transition: border-color var(--transition);
    color: var(--fg);
}

.feedback-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3' stroke-linecap='square' %3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 40px;
}

.feedback-textarea {
    min-height: 120px;
    resize: none;
}

.feedback-select:focus,
.feedback-textarea:focus {
    border-color: var(--primary-red);
}

/* Submit Button - Standard: 10px vertical padding for comfortable click area */
.btn-feedback-submit {
    width: 100%;
    background: var(--fg);
    color: var(--bg);
    border: none;
    padding: calc(var(--feedback-space-md) + 10px) var(--feedback-space-md);
    font-family: var(--font-primary);
    font-weight: 900;
    text-transform: uppercase;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all var(--transition);
    margin-top: var(--feedback-space-lg);
}

.btn-feedback-submit:hover {
    background: var(--primary-red);
}

.btn-feedback-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-feedback-submit svg {
    width: 20px;
    height: 20px;
}

/* Status Message */
.form-message {
    font-family: var(--font-technical);
    font-size: 0.75rem;
    margin-top: 10px;
    min-height: 1.2em;
    text-transform: uppercase;
    font-weight: 700;
}

.form-message.success {
    color: var(--success-color);
}

.form-message.error {
    color: var(--primary-red);
}

/* Responsive */
@media (max-width: 480px) {
    .feedback-trigger {
        bottom: calc(var(--footer-height, 60px) + 15px);
        right: 1.5rem;
        width: 48px;
        height: 48px;
    }

    .feedback-container {
        padding: 2rem 1.5rem;
    }

    .feedback-tooltip {
        max-width: 200px;
        font-size: 0.7rem;
        right: -10px;
    }
}
