/* Styly pro pageelet */
.form-pagelet { background: #ffffff; border: 1px solid #e0e0e0; border-radius: 8px; padding: 20px; margin: 20px 0; position: relative; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.form-pagelet .pagelet-controls { position: absolute; top: 10px; right: 10px; display: flex; gap: 5px; opacity: 0; transition: opacity 0.3s; }
.form-pagelet:hover .pagelet-controls { opacity: 1; }
.form-pagelet .edit-pagelet, .form-pagelet .delete-pagelet { background: #fff; border: 1px solid #ddd; border-radius: 4px; width: 30px; height: 30px; cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.form-pagelet .edit-pagelet:hover { background: #2196F3; color: white; border-color: #2196F3; }
.form-pagelet .delete-pagelet:hover { background: #f44336; color: white; border-color: #f44336; }

/* Styly pro formul?? */
.form-container { max-width: 600px; margin: 0 auto; }
.form-title { font-size: 24px; font-weight: 600; margin-bottom: 20px; color: #333; text-align: center; }
.contact-form .form-group { margin-bottom: 20px; }
.contact-form label { display: block; margin-bottom: 8px; font-weight: 500; color: #333; font-size: 14px; }

.contact-form input[type="text"], .contact-form input[type="email"], .contact-form input[type="tel"], .contact-form input[type="date"], .contact-form input[type="time"], .contact-form input[type="number"], .contact-form input[type="url"], .contact-form textarea { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; font-family: inherit; transition: border-color 0.3s; box-sizing: border-box; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: #2196F3; }
.contact-form textarea { resize: vertical; min-height: 100px; }

/* Select ? vlastní styl sjednocený s ostatními inputy */
.contact-form select {
    width: 100%;
    padding: 12px 40px 12px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    color: #333;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: border-color 0.3s;
    box-sizing: border-box;
}
.contact-form select:focus {
    outline: none;
    border-color: #2196F3;
}
.contact-form select option[value=""] {
    color: #999;
}

/* GDPR checkbox */
.gdpr-group { margin-top: 15px; }
.checkbox-label { display: flex; align-items: flex-start; font-weight: normal; cursor: pointer; }
.checkbox-label input[type="checkbox"] { margin-right: 10px; margin-top: 3px; cursor: pointer; }
.gdpr-link { color: #2196F3; text-decoration: none; }
.gdpr-link:hover { text-decoration: underline; }

/* Tla??tko odeslat */
.submit-btn { background: #2196F3; color: white; border: none; padding: 12px 30px; border-radius: 4px; font-size: 16px; font-weight: 600; cursor: pointer; transition: background 0.3s; width: 100%; margin-top: 10px; }
.submit-btn:hover { background: #1976D2; }
.submit-btn:active { transform: scale(0.98); }

/* Modal overlay */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.5); display: flex; align-items: center; justify-content: center; z-index: 10000; animation: fadeIn 0.2s; }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Modal content */
.modal-content { background: white; border-radius: 8px; width: 90%; max-width: 600px; max-height: 90vh; display: flex; flex-direction: column; animation: slideUp 0.3s; }
.modal-content.large { max-width: 800px; }

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Modal header */
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid #e0e0e0; }
.modal-header h2 { margin: 0; font-size: 22px; color: #333; }
.close-modal { background: none; border: none; font-size: 28px; cursor: pointer; color: #999; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; transition: color 0.2s; }
.close-modal:hover { color: #333; }

/* Modal body */
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }

/* Seznam formul??? */
.forms-list { display: flex; flex-direction: column; gap: 15px; }
.form-item { background: #f8f9fa; border: 1px solid #e0e0e0; border-radius: 6px; padding: 15px; display: flex; justify-content: space-between; align-items: center; transition: box-shadow 0.2s; }
.form-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.form-info { flex: 1; }
.form-info strong { display: block; font-size: 16px; color: #333; margin-bottom: 5px; }
.form-info small { display: block; color: #666; font-size: 13px; margin-top: 3px; }
.form-actions { display: flex; gap: 10px; }

.btn-edit, .btn-delete { padding: 8px 16px; border: none; border-radius: 4px; cursor: pointer; font-size: 14px; font-weight: 500; transition: all 0.2s; }
.btn-edit { background: #2196F3; color: white; }
.btn-edit:hover { background: #1976D2; }
.btn-delete { background: #f44336; color: white; }
.btn-delete:hover { background: #d32f2f; }

.no-forms { text-align: center; color: #999; padding: 40px; font-size: 16px; }

/* Formul?? nastaven? */
#formSettingsForm .form-group { margin-bottom: 20px; }
#formSettingsForm label { display: block; margin-bottom: 8px; font-weight: 500; color: #333; font-size: 14px; }
#formSettingsForm input[type="text"], #formSettingsForm input[type="email"], #formSettingsForm input[type="url"] { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; box-sizing: border-box; }
#formSettingsForm input:focus { outline: none; border-color: #2196F3; }

/* Vlastn? pole */
.custom-fields-section { margin-top: 30px; padding-top: 20px; border-top: 2px solid #e0e0e0; }
.custom-fields-section h3 { font-size: 18px; margin-bottom: 15px; color: #333; }
#customFieldsList { display: flex; flex-direction: column; gap: 10px; margin-bottom: 15px; }
.custom-field-item { background: #f8f9fa; border: 1px solid #e0e0e0; border-radius: 4px; padding: 12px; }
.field-row { display: flex; gap: 10px; align-items: center; }

.field-row input[type="text"] { flex: 2; padding: 8px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; }
.field-row select { flex: 1; padding: 8px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; cursor: pointer; }
.field-row .checkbox-label { flex: 0 0 auto; font-size: 14px; white-space: nowrap; }

.btn-add-field { background: #4CAF50; color: white; border: none; padding: 10px 20px; border-radius: 4px; cursor: pointer; font-size: 14px; font-weight: 500; transition: background 0.2s; }
.btn-add-field:hover { background: #45a049; }
.btn-remove-field { background: #f44336; color: white; border: none; width: 30px; height: 30px; border-radius: 4px; cursor: pointer; font-size: 18px; display: flex; align-items: center; justify-content: center; transition: background 0.2s; flex-shrink: 0; }
.btn-remove-field:hover { background: #d32f2f; }

/* Ak?n? tla??tka ve formul??i */
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; padding-top: 20px; border-top: 1px solid #e0e0e0; }
.btn-save { background: #4CAF50; color: white; border: none; padding: 12px 24px; border-radius: 4px; cursor: pointer; font-size: 15px; font-weight: 600; transition: background 0.2s; }
.btn-save:hover { background: #45a049; }
.btn-cancel { background: #757575; color: white; border: none; padding: 12px 24px; border-radius: 4px; cursor: pointer; font-size: 15px; font-weight: 600; transition: background 0.2s; }
.btn-cancel:hover { background: #616161; }

/* Responzivn? design */
@media (max-width: 768px) {
    .modal-content { width: 95%; max-height: 95vh; }
    .form-item { flex-direction: column; align-items: flex-start; gap: 15px; }
    .form-actions { width: 100%; }
    .field-row { flex-wrap: wrap; }
    .field-row input[type="text"], .field-row select { min-width: 120px; }
}
