/* CureClass CBT Goals Plugin Styles */

.cbt-goals-form-container,
.cbt-goals-display-container,
.cbt-anxiety-stimulus-form-container,
.cbt-anxiety-stimulus-display-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.cbt-goals-form-container h3,
.cbt-goals-display-container h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
}

.cbt-goals-form-container p {
    color: #5a6c7d;
    line-height: 1.6;
    margin-bottom: 25px;
    text-align: center;
}

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

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

.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 16px;
    line-height: 1.5;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    resize: vertical;
    min-height: 100px;
}

.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.cbt-goals-submit-btn,
.cbt-anxiety-stimulus-submit-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cbt-goals-submit-btn:hover,
.cbt-anxiety-stimulus-submit-btn:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.cbt-goals-submit-btn:active,
.cbt-anxiety-stimulus-submit-btn:active {
    transform: translateY(0);
}

#cbt-goals-message,
#cbt-anxiety-stimulus-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 6px;
    font-weight: 500;
    text-align: center;
}

#cbt-goals-message.success,
#cbt-anxiety-stimulus-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#cbt-goals-message.error,
#cbt-anxiety-stimulus-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.goals-list {
    margin-bottom: 25px;
}

.goal-item {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.goal-item h4 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 600;
}

.goal-item p {
    color: #5a6c7d;
    line-height: 1.6;
    margin: 0;
    font-size: 16px;
}

.goals-meta,
.stimulus-meta {
    text-align: center;
    color: #7f8c8d;
    font-size: 14px;
    font-style: italic;
    padding-top: 20px;
    border-top: 1px solid #ecf0f1;
}

.goals-meta p,
.stimulus-meta p {
    margin: 5px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cbt-goals-form-container,
    .cbt-goals-display-container,
    .cbt-anxiety-stimulus-form-container,
    .cbt-anxiety-stimulus-display-container,
    .goals-saved-success,
    .stimulus-saved-success,
    .goals-already-set-container,
    .stimulus-already-set-container {
        margin: 0 15px;
        padding: 15px;
    }

    .cbt-goals-form-container h3,
    .cbt-goals-display-container h3,
    .cbt-anxiety-stimulus-form-container h3,
    .cbt-anxiety-stimulus-display-container h3 {
        font-size: 20px;
    }

    .goals-saved-success,
    .stimulus-saved-success,
    .goals-already-set-container .goals-saved-success {
        padding: 20px 15px;
    }

    .goals-saved-success h4,
    .stimulus-saved-success h4,
    .goals-already-set-container .goals-saved-success h4,
    .stimulus-already-set-container .stimulus-saved-success h4 {
        font-size: 18px;
    }

    .goals-saved-success p,
    .stimulus-saved-success p,
    .goals-already-set-container .goals-saved-success p,
    .stimulus-already-set-container .stimulus-saved-success p {
        font-size: 14px;
    }

    .form-group textarea {
        padding: 12px;
        font-size: 14px;
    }

    .cbt-goals-submit-btn {
        padding: 12px 25px;
        font-size: 14px;
    }

    .goal-item {
        padding: 15px;
    }

    .goal-item h4 {
        font-size: 16px;
    }

    .goal-item p {
        font-size: 14px;
    }
}

/* Loading state */
.cbt-goals-submit-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
    position: relative;
}

.cbt-goals-submit-btn.loading::after {
    content: '';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

/* Focus styles for accessibility */
.form-group textarea:focus,
.cbt-goals-submit-btn:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Goals and stimulus saved success messages */
.goals-saved-success,
.stimulus-saved-success,
.goals-already-set-container .goals-saved-success {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    margin: 20px 0;
}

.goals-already-set-container,
.stimulus-already-set-container {
    max-width: 800px;
    margin: 0 auto;
}

.goals-saved-success h4,
.stimulus-saved-success h4 {
    color: #155724;
    margin-bottom: 15px;
    font-size: 20px;
    font-weight: 600;
}

.goals-saved-success p,
.stimulus-saved-success p {
    color: #155724;
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
}

/* Print styles */
@media print {
    .cbt-goals-form-container,
    .cbt-goals-display-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .cbt-goals-submit-btn {
        display: none;
    }

    .goals-saved-success,
    .stimulus-saved-success,
    .goals-already-set-container .goals-saved-success,
    .stimulus-already-set-container .stimulus-saved-success {
        background: #f8f9fa !important;
        border: 1px solid #dee2e6 !important;
        color: #495057 !important;
    }
}

