/* Freshdesk Ticket Button - Frontend Styles */

/* Sticky Button */
.ftb-button {
    position: fixed;
    z-index: 9999;
    animation: ftbSlideIn 0.3s ease-out;
}

.ftb-position-bottom-right {
    bottom: 30px;
    right: 30px;
}

.ftb-position-bottom-left {
    bottom: 30px;
    left: 30px;
}

.ftb-position-top-right {
    top: 30px;
    right: 30px;
}

.ftb-position-top-left {
    top: 30px;
    left: 30px;
}

.ftb-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 25px;
    background: var(--ftb-button-color, #0066cc);
    color: white;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

/* Button-Formen */
.ftb-trigger.ftb-shape-rounded {
    border-radius: 12px;
}

.ftb-trigger.ftb-shape-circle {
    border-radius: 50%;
    padding: 8px;
    width: 60px;
    height: 60px;
    min-width: 60px;
    min-height: 60px;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
}

.ftb-trigger.ftb-shape-circle i {
    margin: 0;
}

.ftb-trigger.ftb-shape-circle span {
    font-size: 10px;
    line-height: 1.1;
    text-align: center;
    word-break: break-word;
    max-width: 100%;
    display: block;
}

.ftb-trigger.ftb-shape-square {
    border-radius: 8px;
}

.ftb-trigger.ftb-shape-pill {
    border-radius: 50px;
}

/* Nur Icon (kein Text) */
.ftb-trigger:not(:has(span)) {
    padding: 15px;
    min-width: 50px;
    justify-content: center;
}

.ftb-trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.ftb-trigger:active {
    transform: translateY(0);
}

.ftb-trigger i {
    font-size: 20px;
}

/* Modal */
.ftb-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: ftbFadeIn 0.2s ease-out;
}

.ftb-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ftb-modal-content {
    background-color: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: ftbSlideUp 0.3s ease-out;
}

.ftb-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid #e5e5e5;
}

.ftb-modal-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.ftb-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.ftb-close:hover {
    background-color: #f5f5f5;
    color: #333;
}

/* Formular */
.ftb-form {
    padding: 30px;
}

.ftb-form-group {
    margin-bottom: 20px;
}

.ftb-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.ftb-form-group input[type="text"],
.ftb-form-group input[type="email"],
.ftb-form-group input[type="tel"],
.ftb-form-group select,
.ftb-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.ftb-form-group input:focus,
.ftb-form-group select:focus,
.ftb-form-group textarea:focus {
    outline: none;
    border-color: var(--ftb-button-color, #0066cc);
}

.ftb-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Buttons */
.ftb-form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
}

.ftb-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.ftb-btn-primary {
    background: var(--ftb-button-color, #0066cc);
    color: white;
}

.ftb-btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.ftb-btn-secondary {
    background: #f5f5f5;
    color: #666;
}

.ftb-btn-secondary:hover {
    background: #e5e5e5;
}

.ftb-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Nachrichten */
.ftb-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 6px;
    font-size: 14px;
}

.ftb-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.ftb-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Loading State */
.ftb-form.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Animationen */
@keyframes ftbSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ftbFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes ftbSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .ftb-button {
        bottom: 20px;
        right: 20px;
    }
    
    .ftb-position-bottom-left,
    .ftb-position-top-left {
        left: 20px;
    }
    
    .ftb-position-top-right,
    .ftb-position-top-left {
        top: 20px;
    }
    
    .ftb-trigger {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    /* Text bei nicht-Kreis Buttons ausblenden */
    .ftb-trigger:not(.ftb-shape-circle) span {
        display: none;
    }
    
    /* Bei Kreis-Buttons Text kleiner machen */
    .ftb-trigger.ftb-shape-circle span {
        font-size: 8px;
        line-height: 1;
    }
    
    .ftb-trigger:not(:has(span)) {
        padding: 15px;
    }
    
    .ftb-modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .ftb-modal-header {
        padding: 20px;
    }
    
    .ftb-modal-header h3 {
        font-size: 20px;
    }
    
    .ftb-form {
        padding: 20px;
    }
    
    .ftb-form-actions {
        flex-direction: column;
    }
    
    .ftb-btn {
        width: 100%;
    }
}
