/* Public CSS für das Coaching-Assistant-Plugin */

/* Chat-Widget Stile */
.ca-chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    max-width: calc(100vw - 40px);
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    z-index: 9999;
    overflow: hidden;
    transition: all 0.3s ease;
}

.ca-chat-widget.ca-chat-collapsed {
    height: 60px;
}

.ca-chat-header {
    background-color: #2271b1;
    color: #fff;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.ca-chat-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.ca-chat-toggle {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    position: relative;
}

.ca-chat-toggle-icon {
    display: block;
    width: 16px;
    height: 2px;
    background-color: #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.3s ease;
}

.ca-chat-toggle-icon::before,
.ca-chat-toggle-icon::after {
    content: '';
    display: block;
    width: 16px;
    height: 2px;
    background-color: #fff;
    position: absolute;
    transition: transform 0.3s ease;
}

.ca-chat-toggle-icon::before {
    top: -5px;
}

.ca-chat-toggle-icon::after {
    bottom: -5px;
}

.ca-chat-collapsed .ca-chat-toggle-icon {
    transform: translate(-50%, -50%) rotate(180deg);
}

.ca-chat-body {
    display: flex;
    flex-direction: column;
    height: calc(100% - 60px);
    transition: height 0.3s ease;
}

.ca-chat-collapsed .ca-chat-body {
    height: 0;
    overflow: hidden;
}

.ca-chat-messages {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ca-message {
    display: flex;
    gap: 10px;
    max-width: 80%;
}

.ca-message-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.ca-message-assistant {
    align-self: flex-start;
}

.ca-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ca-message-user .ca-message-avatar {
    background-color: #2271b1;
    color: #fff;
}

.ca-avatar-icon {
    width: 16px;
    height: 16px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z" fill="currentColor"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.ca-message-content {
    background-color: #f0f0f0;
    padding: 10px 15px;
    border-radius: 18px;
    position: relative;
}

.ca-message-user .ca-message-content {
    background-color: #2271b1;
    color: #fff;
}

.ca-message-content p {
    margin: 0;
}

.ca-message-content p + p {
    margin-top: 10px;
}

.ca-chat-input {
    padding: 15px;
    border-top: 1px solid #f0f0f0;
}

.ca-input-container {
    display: flex;
    gap: 10px;
}

#ca_chat_input {
    flex-grow: 1;
    border: 1px solid #ddd;
    border-radius: 18px;
    padding: 10px 15px;
    resize: none;
    font-family: inherit;
    font-size: 14px;
}

.ca-send-button {
    align-self: flex-end;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #2271b1;
    border: none;
    cursor: pointer;
    color: #fff;
}

.ca-send-icon {
    width: 16px;
    height: 16px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z" fill="white"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.ca-typing-indicator {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.ca-typing-dot {
    width: 6px;
    height: 6px;
    background-color: #999;
    border-radius: 50%;
    animation: typing-animation 1.4s infinite both;
}

.ca-typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.ca-typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

.ca-typing-text {
    font-size: 12px;
    color: #666;
    margin-left: 5px;
}

@keyframes typing-animation {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-4px);
    }
}

.ca-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Buchungsformular Stile */
.ca-booking-form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.ca-booking-form-container h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
}

.ca-booking-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ca-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.ca-form-group {
    flex: 1;
    min-width: 250px;
}

.ca-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.ca-required {
    color: #e74c3c;
}

.ca-form-group input[type="text"],
.ca-form-group input[type="email"],
.ca-form-group input[type="tel"],
.ca-form-group input[type="date"],
.ca-form-group select,
.ca-form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.ca-form-group input:focus,
.ca-form-group select:focus,
.ca-form-group textarea:focus {
    border-color: #2271b1;
    outline: none;
}

.ca-form-help {
    margin-top: 5px;
    font-size: 14px;
    color: #666;
}

.ca-form-privacy {
    margin-top: 10px;
}

.ca-form-privacy label {
    display: flex;
    align-items: flex-start;
    font-weight: normal;
}

.ca-form-privacy input[type="checkbox"] {
    margin-top: 3px;
    margin-right: 8px;
}

.ca-form-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ca-booking-submit,
.ca-feedback-submit {
    padding: 12px 24px;
    background-color: #2271b1;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.ca-booking-submit:hover,
.ca-feedback-submit:hover {
    background-color: #135e96;
}

.ca-booking-loading,
.ca-feedback-loading {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ca-loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #2271b1;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.ca-loading-text {
    color: #666;
}

.ca-booking-error,
.ca-feedback-error {
    padding: 10px 15px;
    background-color: #fef2f2;
    border-left: 4px solid #e74c3c;
    color: #e74c3c;
    margin-top: 15px;
}

.ca-booking-success,
.ca-feedback-success {
    padding: 30px;
    text-align: center;
}

.ca-success-message {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.ca-success-icon {
    display: block;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #2ecc71;
    position: relative;
}

.ca-success-icon:before,
.ca-success-icon:after {
    content: '';
    position: absolute;
    background-color: white;
}

.ca-success-icon:before {
    width: 3px;
    height: 15px;
    left: 20px;
    top: 25px;
    transform: rotate(45deg);
}

.ca-success-icon:after {
    width: 3px;
    height: 25px;
    left: 30px;
    top: 15px;
    transform: rotate(-45deg);
}

.ca-success-message p {
    font-size: 18px;
    color: #333;
    margin: 0;
}

/* Werkzeug-Anzeige Stile */
.ca-tools-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

.ca-tools-container h2 {
    margin-top: 0;
    margin-bottom: 30px;
    color: #333;
    font-size: 28px;
    text-align: center;
}

.ca-tools-filter {
    margin-bottom: 30px;
    text-align: right;
}

.ca-tools-filter label {
    margin-right: 10px;
    font-weight: 600;
}

.ca-tools-filter select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
}

.ca-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.ca-tool-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.ca-tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.ca-tool-header {
    padding: 20px 20px 10px;
}

.ca-tool-title {
    margin: 0 0 10px;
    font-size: 20px;
    color: #333;
}

.ca-tool-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
}

.ca-tool-category {
    display: inline-block;
    padding: 3px 8px;
    background-color: #f0f0f0;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
}

.ca-tool-meta {
    padding: 0 20px 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.ca-tool-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
}

.ca-meta-icon {
    width: 16px;
    height: 16px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.ca-tool-excerpt {
    padding: 15px 20px;
    flex-grow: 1;
    color: #666;
    font-size: 15px;
    line-height: 1.5;
}

.ca-tool-footer {
    padding: 15px 20px;
    border-top: 1px solid #f0f0f0;
    text-align: right;
}

.ca-tool-link {
    display: inline-block;
    padding: 8px 16px;
    background-color: #2271b1;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: background-color 0.3s;
}

.ca-tool-link:hover {
    background-color: #135e96;
    color: #fff;
    text-decoration: none;
}

.ca-tools-empty {
    text-align: center;
    padding: 40px 0;
    color: #666;
    font-size: 16px;
}

/* Fortschrittsanzeige Stile */
.ca-progress-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.ca-progress-container h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
    text-align: center;
}

.ca-progress-header {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.ca-coachee-info {
    flex: 1;
    min-width: 250px;
}

.ca-coachee-info h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 20px;
    color: #333;
}

.ca-coachee-type,
.ca-coachee-start-date {
    margin-bottom: 5px;
    font-size: 14px;
    color: #666;
}

.ca-type-label,
.ca-date-label {
    font-weight: 600;
}

.ca-overall-progress {
    flex: 1;
    min-width: 250px;
}

.ca-progress-label {
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

.ca-progress-bar-container {
    height: 24px;
    background-color: #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
}

.ca-progress-bar {
    height: 100%;
    background-color: #2271b1;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.5s ease;
}

.ca-progress-text {
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

.ca-goals-section,
.ca-progress-history,
.ca-sessions-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.ca-goals-section h3,
.ca-progress-history h3,
.ca-sessions-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    color: #333;
}

.ca-goals-content {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    border-left: 3px solid #2271b1;
}

.ca-progress-chart-container {
    margin-bottom: 30px;
    height: 200px;
}

.ca-progress-timeline {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ca-timeline-item {
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.ca-timeline-date {
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.ca-timeline-progress {
    margin-bottom: 10px;
}

.ca-timeline-notes {
    font-size: 14px;
    color: #666;
}

.ca-sessions-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ca-session-item {
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
    border-left: 3px solid #2271b1;
}

.ca-session-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.ca-session-title {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.ca-session-date {
    font-size: 14px;
    color: #666;
}

.ca-session-notes,
.ca-session-tools {
    margin-top: 15px;
}

.ca-session-notes h5,
.ca-session-tools h5 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 14px;
    color: #333;
}

.ca-tools-list {
    margin: 0;
    padding-left: 20px;
}

.ca-tools-list li {
    margin-bottom: 5px;
}

.ca-tools-list a {
    color: #2271b1;
    text-decoration: none;
}

.ca-tools-list a:hover {
    text-decoration: underline;
}

.ca-no-data,
.ca-progress-error {
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
    color: #666;
    text-align: center;
}

/* Feedback-Formular Stile */
.ca-feedback-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.ca-feedback-container h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
}

.ca-feedback-session-info {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
    border-left: 3px solid #2271b1;
}

.ca-feedback-session-info h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
    color: #333;
}

.ca-rating-stars {
    display: flex;
    gap: 10px;
    margin-bottom: 5px;
}

.ca-rating-group {
    position: relative;
}

.ca-rating-group input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ca-star {
    display: inline-block;
    width: 30px;
    height: 30px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z" fill="%23ddd"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    cursor: pointer;
    transition: transform 0.2s;
}

.ca-rating-group input[type="radio"]:checked ~ label .ca-star,
.ca-rating-group input[type="radio"]:hover ~ label .ca-star,
.ca-rating-group label:hover .ca-star,
.ca-rating-group label:hover ~ label .ca-star {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z" fill="%23f39c12"/></svg>');
    transform: scale(1.1);
}

.ca-rating-labels,
.ca-progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.ca-progress-slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ca-progress-slider-container input[type="range"] {
    flex-grow: 1;
    -webkit-appearance: none;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    outline: none;
}

.ca-progress-slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #2271b1;
    border-radius: 50%;
    cursor: pointer;
}

.ca-progress-slider-container input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #2271b1;
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

.ca-progress-value {
    min-width: 50px;
    text-align: center;
    font-weight: 600;
    color: #333;
}

/* Responsive Anpassungen */
@media (max-width: 600px) {
    .ca-form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .ca-form-group {
        min-width: 100%;
    }
    
    .ca-session-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .ca-session-date {
        margin-top: 5px;
    }
    
    .ca-rating-stars {
        justify-content: space-between;
    }
    
    .ca-tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .ca-tools-filter {
        text-align: left;
    }
}
