/* writing-practice.css - Specific Styles for IELTS Writing Practice Page */

/* Import Poppins font, specifically for this page if not globally covered */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Variables specific to writing practice (or overrides for consistency) */
/* Note: These will override variables from style.css. Ensure these align with your overall theme. */
:root {
  --primary: #4361ee; /* A shade of Azure Blue */
  --secondary: #3f37c9;
  --accent: #4cc9f0;
  --success: #4ade80;
  --warning: #f59e0b;
  --danger: #ef4444;
  --light: #f8f9fa;
  --dark: #1e293b;
}

/* Base Body Styles for Writing Practice */
/* Note: This background gradient is from the original writingpractice.html.
   You might want to make it consistent with your main site's Azure Blue theme. */
body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #f0f9ff 0%, #e6f7ff 100%);
  min-height: 100vh;
  color: var(--dark);
}

/* Card Styles */
.card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  border: 1px solid rgba(224, 242, 254, 0.8);
}

.card:hover {
  box-shadow: 0 15px 40px rgba(67, 97, 238, 0.1);
}

/* Gradient Header for Cards */
.header-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
}

/* Primary Button Styles */
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 4px 6px rgba(67, 97, 238, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 14px rgba(67, 97, 238, 0.3);
}

/* Success Button Styles */
.btn-success {
  background: linear-gradient(135deg, var(--success) 0%, #16a34a 100%);
  color: white;
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 4px 6px rgba(74, 222, 128, 0.2);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 14px rgba(74, 222, 128, 0.3);
}

/* Form Element Focus States */
input, select, textarea {
  border: 1px solid #d1d5db !important;
  transition: all 0.3s ease;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15) !important;
}

/* Timer Pulse Animation (specific to writing practice) */
.timer-pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Task Card (in selection) */
.task-card {
  border-left: 4px solid var(--primary);
}

/* Progress Bar (if used, currently removed from HTML) */
.progress-bar {
  height: 6px;
  border-radius: 3px;
  background: #e2e8f0;
  overflow: hidden;
}

.progress {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--primary) 100%);
  transition: width 1s linear;
}

/* Word Count Badge */
.word-count-badge {
  background: var(--accent);
  color: white;
  border-radius: 9999px;
  padding: 2px 10px;
  font-size: 0.8rem;
  display: inline-block;
}

/* Sticky Header (for timer and labels) */
.sticky-header {
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding: 0.25rem 0.5rem; /* py-1 px-2 */
}

.timer-text {
  font-size: 1rem; /* Standard font size */
  line-height: 1.5rem; /* Standard line height for text-base */
}

/* Custom Shadow Class */
.custom-shadow {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Text Gradient */
.text-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Writing Area Textarea */
.writing-area {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.writing-area:focus {
  background: white;
  box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.1);
}

/* Task 1 Layout (flex container) */
.task1-layout-container {
  display: flex;
  flex-direction: column; /* Default to column for small screens */
  gap: 1.5rem; /* Gap between sections */
  max-height: calc(100vh - 160px); /* Adjusted value based on header + title + margin */
}

@media (min-width: 1024px) {
  .task1-layout-container {
    flex-direction: row; /* Row for large screens */
    height: 100%; /* Make them fill the constrained height of the parent */
  }
  .task1-image-panel, .task1-writing-section {
    flex: 1; /* Distribute space equally */
    height: 100%; /* Make them fill the height of the parent */
    display: flex; /* Ensure inner content can flex */
    flex-direction: column; /* Stack header/content inside */
  }
  .task1-image-panel .image-content-area,
  .task1-writing-section > div:last-child { /* Target the content area within writing section */
    flex-grow: 1;
    overflow-y: auto; /* Make content scrollable */
  }
}

/* Task 1 Image Panel Specifics */
#task1ImageContainer img {
  width: 100%; /* Make image fill container */
  height: auto; /* Maintain aspect ratio */
  max-width: 100%; /* Ensure it doesn't overflow */
  object-fit: contain; /* Ensure the image is fully visible */
}

/* Sticky Question (for Task 2) */
.sticky-question {
  position: sticky;
  top: 40px; /* Approximate height of sticky-header + some margin */
  z-index: 10; /* Ensure it stays above other content */
  background: white; /* Or match your card background */
  padding-bottom: 0.25rem; /* Reduced padding below the question */
  box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* Optional shadow for visual separation */
  border-bottom: 1px solid #e2e8f0; /* Optional border */
}
.sticky-question .header-gradient {
  padding: 0.25rem 0.5rem; /* Even smaller padding for header in sticky question */
}
.sticky-question .header-gradient h3 {
  font-size: 1rem; /* text-base (smaller than text-lg) */
}
.sticky-question .p-4 { /* Changed from p-6 to p-4 for question content */
  padding: 0.5rem 1rem; /* Reduced padding for question content */
}