/*
 * File CSS: Base64 Encoder/Decoder Tool Styles
 * Thiết kế 2 cột: Text-area bên trái, Buttons bên phải.
 * Wrapper: .crop-tool-wrap để tránh xung đột với Theme
 */

/* 1. Các biến CSS (Màu Tím là chủ đạo) */
:root {
  --bg: #f5f3ff; /* Nền tím nhạt */
  --card: #fff;
  --primary: #9c27b0; /* Màu Tím cuốn hút */
  --secondary: #64748b; /* Xám xanh (Reset/Neutral) */
  --thirst: #512da8; /* Tím đậm hơn */
  --muted: #6b7280;
  --accent: #ffb74d; /* Màu nhấn phụ (Cam) */
  --text: #111827;
}

.post-thumbnail {
  display: none;
}

/* === WRAPPER CHÍNH === */
.crop-tool-wrap {
    font-family: 'Inter', system-ui, sans-serif;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    margin: 0;
    padding: 0;
}

.crop-tool-wrap .wrap {
  /*max-width: 1200px;*/
  margin:0 auto;
  padding:20px 15px;
}

/* === HEADER/TIÊU ĐỀ === */
.crop-tool-wrap header{
  margin-bottom:12px;
  text-align: center;
}
.crop-tool-wrap h1{
  font-size:28px;
  margin:0;
  color: var(--primary); /* Màu Tím */
  font-weight: 700;
}
.crop-tool-wrap p.lead{
  font-size:16px;
  margin:4px 0 20px;
  color: var(--muted);
}

/* === PANEL CHÍNH (Chứa Text và Buttons) === */
.crop-tool-wrap .panel {
    display: flex; 
    flex-direction: column; /* Mặc định là DỌC (cho mobile) */
    gap: 20px; 
    padding: 5px;
}

/* CỘT CHỨA INPUT VÀ OUTPUT */
.crop-tool-wrap .text-area-column {
    display: flex;
    flex-direction: column;
    gap: 20px; 
    flex: 1;
}

.crop-tool-wrap .input-section,
.crop-tool-wrap .output-section {
    display: flex;
    flex-direction: column;
}

.crop-tool-wrap label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 16px;
    color: var(--text);
}

.crop-tool-wrap textarea {
    width: 100%;
    min-height: 150px; 
    height: 100%; 
    padding: 15px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    box-sizing: border-box;
    font-family: monospace;
    font-size: 15px;
    resize: vertical;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: var(--card);
    color: var(--text);
    line-height: 1.6;
}

.crop-tool-wrap textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(156, 39, 176, 0.25); /* Tím nhạt */
}


/* CỘT CHỨA BUTTONS */
.crop-tool-wrap .button-column {
    display: flex;
    flex-direction: row; /* NGANG trên mobile */
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    align-items: flex-start;
}

.crop-tool-wrap .button-spacer {
    display: none;
}

/* === BUTTON STYLING === */

/* Nút chính (Tím) */
.crop-tool-wrap .btn{
  background: var(--primary); 
  color: #fff; 
  padding:12px 20px; 
  border-radius:10px;
  border:none;
  cursor:pointer;
  font-size:16px; 
  font-weight: 600;
  transition: background 0.2s, transform 0.1s;
  text-decoration: none;
  width: 100%; 
  max-width: 250px; 
}
.crop-tool-wrap .btn:hover{
  background: #7b1fa2; /* Tím đậm hơn */
  transform: translateY(-1px);
}
.crop-tool-wrap .btn:active{
    transform: translateY(0);
}

/* Nút thứ cấp (Xám) */
.crop-tool-wrap .btn.secondary{
  background: var(--secondary); 
  color: #fff; 
}
.crop-tool-wrap .btn.secondary:hover{
  background: #475569; 
}

/* === FOOTER === */
.crop-tool-wrap footer{
  margin-top:20px;
  font-size:13px;
  color: var(--muted);
  text-align:center;
}


/* === MEDIA QUERIES (Bố cục 2 Cột trên Desktop) === */

@media(min-width:800px){
  .crop-tool-wrap .panel{
    flex-direction: row; /* CHUYỂN sang NGANG (2 cột) */
    align-items: stretch;
  }

  .crop-tool-wrap .text-area-column{
    flex: 4; /* Cột văn bản chiếm 3 phần */
    height: 450px; 
  }
  
  .crop-tool-wrap .input-section,
  .crop-tool-wrap .output-section {
      flex: 1; /* Chia đều chiều cao 450px cho 2 textarea */
  }

  .crop-tool-wrap .button-column{
    flex: 1; /* Cột nút chiếm 1 phần */
    flex-direction: column; /* Chuyển các nút sang chiều DỌC */
    justify-content: flex-start;
    padding-top: 50px; 
    min-width: 200px; 
  }
  
  .crop-tool-wrap .button-spacer {
      display: block; 
      width: 100%;
      height: 20px; 
  }

  .crop-tool-wrap .button-column .btn {
      width: 100%;
      max-width: none;
  }
}