/**
 * Table Prompt Styles for GSWPTS Tables
 */

/* Table Prompt Interface */
.swptls-prompt-interface {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0px 0px 0px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.swptls-prompt-header {
    margin: 5px 0px 15px 5px;
}

.swptls-prompt-header h4 {
    margin: 0 0 8px 0;
    color: #1e293b;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.swptls-prompt-header p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

/* Prompt Input Group */
.swptls-prompt-input-group {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 16px;
    align-items: baseline;
    flex-direction: column;
}

.swptls-prompt-input {
    flex: 1;
    padding: 5px 15px;
    border: 1px solid #d1d5db;
    border-radius: 10px !important;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 125px;
    width: 100%;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wp-theme-twentytwentyfive .swptls-prompt-input {
    width: 94%;
}

.swptls-prompt-input:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.swptls-prompt-input::placeholder {
    color: #9ca3af;
}

.swptls-prompt-send-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #3B82F6;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    width: 100%;
    text-align: center;
    justify-content: center;
}

.swptls-prompt-send-btn:hover {
    background: #2563EB;
    transform: translateY(-1px);
}

.swptls-prompt-send-btn:active {
    transform: translateY(0);
}

.swptls-prompt-send-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.swptls-prompt-send-btn.processing {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    cursor: wait;
}

.swptls-prompt-send-btn .prompt-icon {
    font-size: 16px;
    display: flex;
    align-items: center;
}

.swptls-prompt-send-btn .spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Prompt Response */
.swptls-prompt-response {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 16px;
}

.swptls-prompt-response .response-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f3f4f6;
    border-bottom: 1px solid #e5e7eb;
}

.swptls-prompt-response .response-header h5 {
    margin: 0;
    color: #1f2937;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.swptls-prompt-clear-btn {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.swptls-prompt-clear-btn:hover {
    background: #e5e7eb;
    color: #374151;
}

.swptls-prompt-response .response-content {
    padding: 16px;
    color: #374151;
    font-size: 15px;
    line-height: 1.6;
}

.swptls-prompt-response .response-content p {
    margin: 0 0 12px 0;
}

.swptls-prompt-response .response-content p:last-child {
    margin-bottom: 0;
}

.swptls-prompt-response .response-content strong {
    color: #1f2937;
    font-weight: 600;
}

.swptls-prompt-response .response-content em {
    color: #6b7280;
    font-style: italic;
}

.swptls-prompt-response .response-meta {
    padding: 12px 16px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    font-size: 13px;
}

.swptls-prompt-response .meta-info {
    display: flex;
    gap: 16px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.swptls-prompt-response .meta-item {
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 4px;
}

.swptls-prompt-response .original-prompt {
    color: #4b5563;
    font-style: italic;
    padding: 8px 12px;
    background: #f3f4f6;
    border-radius: 4px;
    border-left: 3px solid #008717;
}

.swptls-prompt-response .original-prompt strong {
    color: #1f2937;
    font-style: normal;
}

/* Error Message */
.swptls-prompt-response .error-message {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #dc2626;
    background: #fef2f2;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #fecaca;
}

.swptls-prompt-response .error-icon {
    font-size: 18px;
}

/* Notifications */
.swptls-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.swptls-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.swptls-notification-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.swptls-notification-info .swptls-notification-content {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.swptls-notification-warning .swptls-notification-content {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.swptls-notification-error .swptls-notification-content {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.swptls-notification-message {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
}

.swptls-notification-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    margin-left: 12px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.swptls-notification-close:hover {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .swptls-prompt-interface {
        padding: 16px;
        margin: 12px 0;
    }

    .swptls-prompt-input-group {
        flex-direction: column;
        gap: 12px;
    }

    .swptls-prompt-send-btn {
        width: 100%;
        justify-content: center;
    }

    .swptls-prompt-response .meta-info {
        flex-direction: column;
        gap: 8px;
    }

    .swptls-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}