/**
 * CSS cho Plugin LCP Conversation Practice (v1.4.0)
 *
 * - FEATURE: Thêm style cho "Extra time" input.
 *
 * Tất cả các class đều có tiền tố lcp- và được lồng trong .lcp-app-container
 * để tránh xung đột.
 */

.lcp-app-container {
    width: 98%;
    max-width: 800px;
    height: 450px;
    margin: 20px auto;
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    background: #ffffff;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* --- Màn hình bắt đầu --- */
.lcp-start-screen {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    gap: 20px; /* Điều chỉnh lại khoảng cách một chút */
}

.lcp-options-row {
    display: flex;
    gap: 15px;
    width: 100%;
    justify-content: center;
}

.lcp-options-row-label {
    text-align: center;
    font-size: 14px;
    color: #555;
    margin-bottom: -10px; /* Điều chỉnh lại */
    font-weight: bold;
}

/* Nút chung */
.lcp-btn {
    padding: 12px 20px;
    min-width: 120px;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
    color: #333;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    text-align: center;
    transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.lcp-btn:hover {
    background-color: #f1f1f1;
    border-color: #bbb;
}

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

/* Nút khi được chọn */
.lcp-btn.lcp-selected {
    background-color: #0073e6;
    color: #ffffff;
    border-color: #0073e6;
    box-shadow: 0 0 5px rgba(0, 115, 230, 0.5);
}

/* Nút Start */
.lcp-btn-start {
    background-color: #28a745;
    color: #ffffff;
    border-color: #28a745;
    font-weight: bold;
    width: 50%;
    font-size: 18px;
    margin-top: 10px; /* Thêm khoảng cách */
}

.lcp-btn-start:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

/* --- NEW (v1.4.0): Extra Time Input --- */
.lcp-extra-time-row {
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.lcp-extra-time-row label {
    font-size: 14px;
    color: #555;
    font-weight: bold;
}

.lcp-extra-time-input {
    width: 80px;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    text-align: center;
}

/* Utility class để ẩn hàng */
.lcp-hidden {
    display: none !important;
}
/* --- /END NEW --- */

/* Thông báo lỗi khi chưa chọn */
.lcp-start-screen.lcp-error .lcp-options-row-label {
    color: #d63638;
    animation: lcp-shake 0.5s;
}

@keyframes lcp-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}


/* --- Màn hình Chat --- */
.lcp-chat-area {
    flex-grow: 1;
    overflow-y: auto;
    padding: 15px;
    background-color: #f9f9f9;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lcp-chat-line {
    padding: 10px 15px;
    border-radius: 12px;
    max-width: 80%;
    line-height: 1.5;
    word-wrap: break-word;
    animation: lcp-fade-in 0.3s ease-out;
}

@keyframes lcp-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.lcp-speaker-a {
    background-color: #e1f0ff;
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.lcp-speaker-b {
    background-color: #dcf8c6;
    color: #333;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

/* --- Khu vực điều khiển --- */
.lcp-controls-area {
    padding: 15px;
    border-top: 1px solid #eee;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.lcp-btn-restart {
    flex-grow: 1;
    width: auto;
    min-width: 160px;
    background-color: #f0f0f0;
    border-color: #ccc;
    color: #555;
    font-weight: bold;
}

.lcp-btn-restart:hover {
    background-color: #e5e5e5;
    border-color: #bbb;
}

.lcp-btn-next {
    flex-grow: 2;
    width: auto;
    max-width: 300px;
    background-color: #0073e6;
    color: #fff;
    border-color: #0073e6;
}

.lcp-btn-next:hover {
    background-color: #005a9e;
    border-color: #005a9e;
}

.lcp-end-message {
    text-align: center;
    padding: 20px;
    font-style: italic;
    color: #777;
}

