/* Main Wrapper - Page Background */
.lets-talk-wrapper {
  background-color: #EBF6FD;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #444;
  width: 100%;
  padding-top: 40px; /* Spacing at top */
  padding-bottom: 40px; /* Spacing at bottom */
}

/* Container for width limiting */
.lets-talk-container {
  /* Kept for backward compatibility or if used elsewhere, but mainly handled by lt-step-container now */
  display: none; 
}



/* Tabs */
.lt-tabs {
  display: flex;
  justify-content: center;
  gap: 50px; /* Increased gap based on image spacing */
  margin-bottom: 25px;
}

.lt-tab {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-size: 1.1em;
  font-weight: bold;
  color: #888 !important; /* Lighter by default */
  cursor: pointer;
  padding: 10px 0 !important; /* Remove side padding */
  margin: 0 !important;
  transition: color 0.3s;
  position: relative;
  font-family: "M PLUS Rounded 1c", "Hiragino Maru Gothic Pro", sans-serif !important;
  text-decoration: none !important;
  outline: none !important;
  min-height: auto !important;
}

.lt-tab.active {
  background: transparent !important; /* Ensure active state doesn't get background */
  color: #4eb0af !important; /* Main Teal Color */
  border-bottom: 3px solid #4eb0af !important;
  padding-bottom: 5px !important;
}

/* Add dots decoration for active or general aesthetics if needed,
   but for now just keeping it simple as per image.
   The image has a row of white dots separator?
   Actually the image shows "レベルに合ったナレーションを..." followed by dots.
   I'll add the dots under the title in HTML or CSS.
*/

.lt-tab:hover {
  color: #666;
}

/* Content Table */
.lt-tab-content {
  display: none;
  text-align: left;
  background: transparent; /* Changed from #fff to transparent */
  padding: 0 20px;
  border-radius: 0;
}

.lt-tab-content.active {
  display: block;
  animation: fadeIn 0.5s;
}

.lt-script-table {
  width: 100%;
  border-collapse: collapse;
}

.lt-script-table td {
  padding: 15px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5); /* Subtle white border instead of grey */
  vertical-align: top;
}

/* Remove timestamp column style */
/* .lt-time removed */

.lt-en {
  font-size: 1.1em;
  font-weight: bold; /* Bolder English */
  color: #333;
  margin-bottom: 5px;
}

.lt-jp {
  font-size: 0.95em;
  font-weight: bold; /* Matching the image which looks quite bold */
  color: #666;
  display: none; /* Default OFF */
}



@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 768px) {
  .lt-header-section {
    flex-direction: column;
  }
  .lt-video-wrapper {
    margin-right: 0;
    margin-bottom: 20px;
  }
  .lt-tabs {
    flex-direction: column;
    gap: 10px;
  }
}

/* Inline Audio Player */
.lt-content-player {
    display: flex;
    align-items: center;
    justify-content: center; /* Centered content */
    gap: 15px;
    gap: 15px;
    margin-bottom: 20px;
    background: #f7f7f7; /* Slightly gray per user request */
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.lt-inline-play-btn {
    background-color: #8ccac9;
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.3s, transform 0.2s;
    outline: none;
}

.lt-inline-play-btn:hover {
    background-color: #7ab8b7;
    transform: translateY(-2px);
}

.lt-inline-play-btn.playing {
    background-color: #ff8da1;
    animation: none; /* No pulse needed for inline, just color change */
}

/* Icons */
.lt-inline-play-btn .icon-play,
.lt-inline-play-btn .icon-stop {
    font-size: 1.2em;
}

.lt-player-status {
    font-size: 0.9em;
    color: #888;
    font-weight: bold;
}

/* Toggle Switch for JP */
.lt-switch-container {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    /* margin-left: auto; Removed to center content */
    font-weight: bold;
    font-size: 0.9em;
    color: #666;
    cursor: pointer;
}

.lt-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

.lt-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.lt-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.lt-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .lt-slider {
    background-color: #4eb0af;
}

input:focus + .lt-slider {
    box-shadow: 0 0 1px #4eb0af;
}

input:checked + .lt-slider:before {
    transform: translateX(18px);
}

/* Karaoke Highlight */
.lt-active-row {
    background-color: #fffacd; /* Light lemon yellow */
    transition: background-color 0.2s;
}

.lt-active-row .lt-en {
    color: #000;
}

.lt-word {
    padding: 0 2px;
    border-radius: 3px;
    transition: background-color 0.1s, color 0.1s;
}

.lt-word.active-word {
    background-color: #ff9800; /* Orange highlight */
    color: #fff;
    font-weight: bold;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* View Toggle Switch */
.lt-view-toggle-bar {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
}

.lt-view-switch {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #cbd5e1;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

.lt-view-switch.active {
    background: #4eb0af;
    color: #fff;
    border-color: #4eb0af;
    box-shadow: 0 2px 4px rgba(78, 176, 175, 0.3);
}

.lt-view-container {
    display: none; /* Hidden by default */
}
.lt-view-container.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Step Section Styles */
/* Step Section Styles */
.lt-step-container,
.lt-simple-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 80px; /* User requested 80px margins */
}

@media (max-width: 768px) {
    .lt-step-container,
    .lt-simple-container {
        padding: 0 15px; 
    }
}

.lt-step-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 30px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.lt-step-header {
    background: #f8fafc;
    padding: 20px 20px; /* Increased top/bottom padding */
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e2e8f0;
    gap: 12px;
}

.lt-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lt-step-badge {
    background: #4eb0af;
    color: #fff;
    font-size: 0.85em;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lt-step-title {
    font-size: 1.1em;
    font-weight: bold;
    color: #334155;
}

.lt-step-content {
    padding: 20px;
}

.lt-flex-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* Step 1 Introduction */
.lt-intro-text-large {
    font-size: 1.25em;
    color: #333;
    line-height: 1.5;
}

/* Timer Styles */
/* Timer Styles (Cute & Consistent) */
.lt-timer-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: #f0fdf9; /* Very light teal/mint */
    padding: 15px 20px;
    border-radius: 20px; /* Cute rounded */
    min-width: 140px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.05);
    border: 2px solid #ccfbf1;
    margin: 0 auto; /* Default center */
}

/* Ensure centering consistency in flex containers */
.lt-timer-block.inline {
    display: inline-flex;
    margin-top: 10px;
}
.lt-timer-block.center {
    width: fit-content;
    margin: 0 auto 20px auto;
}

.lt-timer-display {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 1.8em;
    font-weight: 800;
    color: #4eb0af; /* Main teal color */
    letter-spacing: 2px;
    line-height: 1;
}

.lt-timer-btn {
    background: #4eb0af; 
    color: #fff;
    border: none;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(78, 176, 175, 0.3);
}

.lt-timer-btn:hover {
    background: #3d8b8a;
    transform: translateY(-1px);
}

.lt-timer-btn.running {
    background: #f472b6; /* Pink for stop */
    box-shadow: 0 2px 4px rgba(244, 114, 182, 0.4);
}

/* Small Timer in Header */
.lt-timer-block.small {
    padding: 5px 15px;
    min-width: auto;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 2px solid #e2e8f0;
    box-shadow: none;
    margin: 0;
}
.lt-timer-block.small .lt-timer-display {
    font-size: 1.4em;
    margin: 0;
}
.lt-timer-block.small .lt-timer-btn {
    font-size: 0.8em;
    padding: 4px 10px;
    box-shadow: none;
}
/* Step 2 Video keywords */
.lt-video-wrapper-full, .lt-video-container {
    margin-bottom: 20px;
    border-radius: 20px !important;
    overflow: hidden !important;
    /* Transformation fix for Safari/Chrome overflow clipping */
    transform: translateZ(0); 
    -webkit-mask-image: -webkit-radial-gradient(white, black);
}

/* Target inner aspect-ratio divs specifically */
.lt-video-wrapper-full > div,
.lt-video-container > div {
    border-radius: 20px !important;
    overflow: hidden !important;
}

.lt-video-wrapper-full iframe, 
.lt-video-wrapper-full video,
.lt-video-container iframe,
.lt-video-container video {
    border-radius: 20px !important;
}
.lt-keywords-box {
    background: #fffbeb; /* Light yellow wrapper */
    border: 1px solid #fcd34d;
    padding: 15px;
    border-radius: 8px;
}
.lt-keywords-box h4 {
    margin: 0 0 10px 0;
    color: #b45309;
    font-size: 1em;
}

/* Instructions */
.lt-instructions {
    text-align: center;
    color: #64748b;
    margin-bottom: 15px;
    font-size: 0.95em;
}

/* Discussion Cards (Step 4 & 5) */
.lt-discussion-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}
@media (min-width: 768px) {
    .lt-discussion-area {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
    .lt-timer-block {
        /* On desktop, timer stays simpler */
    }
}

/* Fun Tabs with Characters */
.lt-tabs-container-fun {
    display: flex;
    align-items: center; /* Center vertically */
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
    position: relative;
    padding-top: 20px; /* Space for heads */
}

.lt-tab-char {
    height: 120px !important; /* Force override theme styles */
    width: auto !important;
    max-width: none !important; /* Prevent 100% width constraints */
    object-fit: contain;
    transition: transform 0.3s;
}

.lt-tab-char.char-left {
    transform: rotate(-5deg);
}

.lt-tab-char.char-right {
    transform: rotate(5deg);
}

.lt-tabs-container-fun:hover .lt-tab-char {
    transform: scale(1.1) rotate(0deg);
}

/* Adjust inner tabs margin since container handles spacing */
.lt-tabs-container-fun .lt-tabs {
    margin-bottom: 0;
}

/* Toggle Bar Characters (New) */
.lt-toggle-char {
    height: 60px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s;
    pointer-events: none; /* Let clicks pass through */
    position: relative;
    z-index: 1;
}

.lt-toggle-char.left {
    margin-right: -10px;
    transform: rotate(-10deg);
}

.lt-toggle-char.right {
    margin-left: -10px;
    transform: rotate(10deg);
}

.lt-view-switch {
    z-index: 2; /* Buttons sit on top */
    position: relative;
}

.lt-discussion-card {
    flex-grow: 1;
}
.lt-discussion-card h3 {
    color: #4eb0af;
    margin: 0 0 10px 0;
}
.lt-discussion-prompts {
    list-style: none;
    padding: 0;
    margin: 15px 0 0 0;
}
.lt-discussion-prompts li {
    background: #f0fdf9;
    border-left: 4px solid #4eb0af;
    padding: 8px 12px;
    margin-bottom: 8px;
    font-weight: 600;
    color: #115e59;
}

.lt-discussion-card.share-card h3 {
    color: #f59e0b;
}
.lt-discussion-card.share-card .lt-teacher-prompt {
    font-size: 1.1em;
    font-style: italic;
    color: #4b5563;
    margin-top: 15px;
    background: #fef3c7;
    padding: 10px;
    border-radius: 8px;
    display: inline-block;
}

/* Step 5 Fun Layout */
.lt-discussion-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 768px) {
    .lt-fun-step-5 {
        align-items: flex-end;
    }
    .lt-fun-step-5 .lt-tab-char {
        margin-bottom: 20px; 
    }
}

@media (max-width: 767px) {
    .lt-fun-step-5 .lt-tab-char {
        display: none; 
    }
}

/* Audio Player Tweaks */
.lt-content-player {
    /* Keep existing but ensure it fits in step content */
    margin-bottom: 15px;
}

/* 
 * Script Table Styling - Enhanced for Local/Production consistency
 * Using stronger specificity to override theme defaults (like Hello Elementor)
 */
.lt-script-content table {
    width: 100% !important;
    border-collapse: collapse !important;
    border: none !important; /* Clean outer border */
    margin: 0 !important;
    table-layout: fixed !important; /* Prevent cell shifting */
}

.lt-script-content td {
    padding: 15px 20px !important;
    border: none !important;
    border-bottom: 1px solid #eef2f6 !important; /* Subtle separator */
    vertical-align: top;
    background: #fff !important; /* Default row background */
}

/* Zebra Striping */
.lt-script-content tr:nth-child(even) td {
    background-color: #DCF8F6 !important; /* Light cyan for even rows */
}

/* Typography in Table */
.lt-script-content .lt-en {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
    font-size: 1.1em;
    font-weight: 700;
    color: #1e293b; /* Dark slate */
    line-height: 1.5;
    margin-bottom: 6px;
}

.lt-script-content .lt-jp {
    font-family: "M PLUS Rounded 1c", "Hiragino Maru Gothic Pro", sans-serif !important; /* Force Rounded font */
    font-size: 0.95em;
    color: #64748b; /* Slate gray */
    line-height: 1.5;
    margin-top: 0;
}

/* Apply Rounded Font to other Japanese elements */
.lt-step-title, 
.lt-instructions, 
.lt-discussion-card p,
.lt-tab {
    font-family: "M PLUS Rounded 1c", "Hiragino Maru Gothic Pro", sans-serif !important;
}

/* Remove default table/td/tr borders from themes */
.lt-script-content tr, 
.lt-script-content th {
    border: none !important;
}

/* ---------------------------------------------------------
   4. Recording UI Styles
   --------------------------------------------------------- */
.lt-record-btn {
    background-color: #f97316 !important; /* Orange with !important */
    color: #fff !important;
    border: none !important;
    border-radius: 30px !important;
    padding: 10px 20px !important;
    font-size: 16px !important;
    font-weight: bold !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.3s, transform 0.2s;
    outline: none !important;
    box-shadow: none !important; /* Reset theme box-shadow */
    line-height: 1.5 !important;
}

.lt-record-btn:hover {
    background-color: #ea580c !important;
    transform: translateY(-2px);
}

.lt-record-btn.recording {
    background-color: #dc2626 !important; /* Red for Stop */
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(220, 38, 38, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

/* Icons within buttons */
.lt-inline-play-btn .icon-play,
.lt-inline-play-btn .icon-stop,
.lt-record-btn .icon-mic,
.lt-record-btn .icon-stop-rec {
    display: flex; /* Removed !important to allow .hide() to work */
    align-items: center !important;
    justify-content: center !important;
    line-height: 0 !important;
}

.lt-inline-play-btn svg,
.lt-record-btn svg {
    display: block !important; /* Removes baseline gap */
}

.lt-audio-playback {
    outline: none;
    border-radius: 30px;
    vertical-align: middle;
}


/* Speed Selector Style */
.lt-speed-select {
    padding: 8px 12px 8px 12px !important;
    border-radius: 20px !important;
    border: 1px solid #ddd !important;
    background-color: #fff !important;
    color: #555 !important;
    font-size: 14px !important;
    outline: none !important;
    cursor: pointer !important;
    font-family: inherit !important;
    font-weight: bold !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    /* Custom SVG Arrow */
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007CB2%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    background-size: 10px !important;
    padding-right: 30px !important; 
    margin-right: 10px !important;
    display: inline-block !important;
    height: auto !important;
    line-height: 1.5 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100px !important; /* Force width constraint */
    flex: 0 0 auto !important; /* Prevent flex growth */
    box-sizing: border-box !important;
}

.lt-speed-select:hover {
    border-color: #bbb !important;
}

.lt-speed-select:focus {
    border-color: #4eb0af !important;
    box-shadow: 0 0 0 2px rgba(78, 176, 175, 0.2) !important;
}
