/* Layout */
.t2c-layout {
    display: flex;
    gap: 35px;
    align-items: flex-start;
	justify-content: space-evenly;
    flex-wrap: wrap;
}

/* Card */
.t2c-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 16px 18px;
    box-shadow: 0 0 0 1px #eee;
}

.t2c-left {
    flex: 0 0 calc(50% - 25px);
    max-width: 100%;
}
.t2c-right {
    flex: 0 0 calc(50% - 25px);
    max-width: 100%;
}

/* Label + textarea */
.t2c-label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

.t2c-textarea {
    width: 100%;
    border-radius: 6px;
    border: 1px solid #ddd;
    padding: 10px 12px;
    font-size: 14px;
    resize: vertical;
    min-height: 120px;
    box-sizing: border-box;
	outline: none;
}

/* Hàng Translate / Inspire */
.t2c-prompt-tools {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 6px 0 10px;
}

.t2c-link-btn {
    background: none;
    border: none;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
}

#t2c-translate-btn{display:none}

.t2c-link-btn:hover {
    color: #333;
}

.t2c-icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid #ccc;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

/* Nút Generate */
.t2c-generate-btn {
    display: block;
    width: 100%;
	max-width: 360px;
    margin: 5px auto;
    border: none;
    border-radius: 20px;
    padding: 10px 14px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
	background: linear-gradient(to right, #ff6b6b, #ff9472);
    box-shadow: 0 6px 16px rgba(255, 107, 107, 0.4);
    transition: all 0.3s ease;
}

.t2c-generate-btn:disabled {
    opacity: 0.7;
    cursor: default;
}

.t2c-generate-btn:hover{
	background: linear-gradient(to right, #ff5252, #ffb374);
    box-shadow: 0 6px 16px rgba(255, 107, 107, 0.4);
}
/* Message */
.t2c-message {
    margin-top: 8px;
    font-size: 13px;
}
.t2c-message-error {
    color: #cc0000;
}
.t2c-message-success {
    color: #2b8a3e;
}

/* Preview card */
.t2c-preview-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.t2c-preview-box {
    border-radius: 8px;
    border: 1px solid #eee;
    background: #fff;
    height: 360px; 
    max-width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    padding: 10px 12px;
}

.t2c-preview-inner {
        flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.t2c-preview-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    display: block;
	object-fit: contain;

    /* hiệu ứng hiện dần từ trên xuống */
    opacity: 0;
    animation: t2c-reveal-image 5s ease-out forwards;
}

.t2c-preview-placeholder {
    color: #999;
    font-size: 14px;
}

/* Toolbar dưới preview */
.t2c-preview-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
	flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

/* Base button */
.t2c-btn {
    border: none;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.t2c-btn-download {
    background: #3b88c3;
}
.t2c-btn-share {
    background: #f6428a;
	display: none;
}
.t2c-btn-auto {
    background: #3ba5ff;
	display: none;
}
.t2c-btn-manual {
    background: #ffc300;
    color: #333;
}

/* Progress bar AI */
.t2c-progress-wrap {
    margin-bottom: 12px;
    font-size: 13px;
    color: #555;
}

.t2c-progress-header,
.t2c-progress-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.t2c-progress-bar {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: #eee;
    overflow: hidden;
}

.t2c-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, #ff8a5c, #ff5c7b);
    transition: width 0.1s linear;
}

#introduce{width:100%;margin: 20px auto;}
#introduce p{font-size:13px;margin-bottom:10px;font-weight:normal;line-height: 18px;}
#introduce p span{font-weight:600;width: 100%;display: block;}

/* Responsive */

@media (max-width: 768px) {
    .t2c-layout {
        flex-direction: column;
    }
    .t2c-left, .t2c-right {
        flex: 1 1 100%;
		width: 100%;
    }
	.t2c-right{order: -1;}
}

/* HISTORY WRAP */
.t2c-history-wrap {
    margin-top: 24px;
}

.t2c-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.t2c-history-title {
    font-weight: 600;
    font-size: 16px;
}

.t2c-history-clear {
    border: none;
    background: white;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 2px;
}

.t2c-history-clear:hover {
    background:#deeffb;
	border-color:#3b88c3;
}

/* LIST + ITEM */
.t2c-history-list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 5px;
}

.t2c-history-empty {
    font-size: 13px;
    color: #777;
}

.t2c-history-item {
    flex: 0 0 150px;
    max-width: 150px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 0 0 1px #eee;
    padding: 8px;
    position: relative;
    box-sizing: border-box;
	margin-top: 10px;
}

.t2c-history-thumb {
    width: 100%;
    height: 110px;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.t2c-history-thumb img {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

.t2c-history-body {
    margin-top: 6px;
}

.t2c-history-prompt {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.t2c-history-time {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
	display: none;
}

.t2c-history-delete,.t2c-history-download {
    position: absolute;
    top: 4px;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    border: none;
    background: rgba(0,0,0,0.05);
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #fff;
}

.t2c-history-delete {
    right: 4px;
	background:#fd5151;
}

.t2c-history-download {
    right: 28px;
	background:#56a7e5;
}

.t2c-history-delete:hover{background:#f53131}
.t2c-history-download:hover {
    background: #0970bf;
}

.t2c-history-note {
    margin-top: 6px;
    font-size: 12px;
    color: #777;
}


@media (max-width: 480px) {
    .t2c-preview-box {
        height: 280px;
    }
}

@keyframes t2c-reveal-image {
    0% {
        opacity: 0;
        clip-path: inset(0 0 100% 0); /* che 100% từ DƯỚI */
    }
    100% {
        opacity: 1;
        clip-path: inset(0 0 0 0); /* hiện hoàn toàn */
    }
}
