@import url('https://fonts.googleapis.com/css?family=Roboto:400,500&display=swap');
@import url('https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css');

/* Moderní styl pro formulář s feedbackem */
#feedback-form-wrapper {
    position: fixed;
    width: 380px;
    max-width: calc(100vw - 40px);
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border: none;
    z-index: 10000;
    padding: 25px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15), 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 16px;
    font-family: 'Roboto', sans-serif;
    box-sizing: border-box;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    animation: slideIn 0.3s ease-out;
}

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

@media (max-width: 768px) {
    #feedback-form-wrapper {
        width: calc(100vw - 20px) !important;
        max-width: 350px !important;
        margin: 10px;
        position: fixed !important;
        top: 20px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        right: auto !important;
        bottom: auto !important;
    }
    
    #feedback-header {
        margin: -25px -25px 15px -25px;
        padding: 12px 20px;
        font-size: 15px;
    }
    
    #feedback-form textarea {
        min-height: 70px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Pomocné třídy */
.fade-in {
    animation: slideIn 0.3s ease-out;
}

.fade-out {
    animation: slideOut 0.2s ease-in forwards;
}

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

/* Odstranění starých duplicitních stylů */
label, .feedback-label {
    font-family: 'Roboto', sans-serif;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.4;
    color: white;
}

.feedback-label:after {
    display: none; /* Skryjeme starý FontAwesome icon */
}

.feedback-text-button:after {
    display: none; /* Skryjeme starý FontAwesome icon */
}

/* Hlavička okna - gradient bude generován dynamicky v PHP */
#feedback-header {
    color: white;
    margin: -25px -25px 20px -25px;
    padding: 15px 25px;
    border-radius: 16px 16px 0 0;
    cursor: move;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 16px;
}

#feedback-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    transition: all 0.2s ease;
}

#feedback-close:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

/* Styl pro bulletin, který se zobrazuje u vybraného textu */
#feedback-bulletin {
    position: absolute;
    background: yellow;
    border: 1px solid #000;
    padding: 5px 10px;
    cursor: pointer;
    z-index: 10001;
    display: none;
    font-family: 'Roboto', sans-serif;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    opacity: 0.9;
    text-align: center;
}

/* Moderní textová pole */
#feedback-form textarea {
    width: 88%;
    padding: 12px 16px;
    margin-bottom: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    transition: all 0.2s ease;
    resize: vertical;
    min-height: 80px;
}

#feedback-form textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#feedback-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

#feedback-form button[type="submit"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

#feedback-form button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

#feedback-message {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-weight: 500;
    display: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 1;
}

#feedback-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
    font-size: 15px;
}

#feedback-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
    font-size: 15px;
}

.sortable.asc::after {
    content: " ▲";
}

.sortable.desc::after {
    content: " ▼";
}

#feedback-pending-table th, #feedback-completed-table th {
    text-align: center;
}

#feedback-pending-table .sortable, #feedback-completed-table .sortable {
    text-decoration: underline;
    text-decoration-style: dotted;
    cursor: pointer;
}

#feedback-pending-table th, td, #feedback-completed-table th, td {
        border: 1px dotted gainsboro;
    }