/* ===== AI TEXT SUMMARIZER CSS ===== */

/* Model Banner */
.summ-model-banner {
    background: linear-gradient(135deg, #064e3b, #065f46, #059669);
    border-radius: 16px;
    padding: 28px 30px;
    color: #fff;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}
.summ-model-spinner {
    width: 44px; height: 44px;
    border: 4px solid rgba(255,255,255,0.2);
    border-top-color: #6ee7b7;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.summ-model-info strong { display: block; font-size: 18px; margin-bottom: 4px; }
.summ-model-info span   { font-size: 13px; opacity: 0.85; }
.summ-model-bar  { width: 100%; max-width: 340px; background: rgba(255,255,255,0.2); height: 8px; border-radius: 999px; overflow: hidden; }
.summ-model-fill { height: 100%; background: linear-gradient(90deg, #6ee7b7, #34d399); border-radius: 999px; transition: width 0.5s ease; }

/* Quick Examples */
.summ-examples {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.summ-ex-label { font-size: 13px; font-weight: 700; color: #6b7280; }
.summ-ex-btn {
    background: #f0fdf4; border: 2px solid #86efac;
    border-radius: 20px; padding: 7px 16px;
    font-size: 13px; font-weight: 600; color: #15803d;
    cursor: pointer; transition: all 0.2s;
}
.summ-ex-btn:hover { background: #dcfce7; border-color: #16a34a; }

/* Grid */
.summ-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

/* Panel */
.summ-panel {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.summ-output-panel { border-color: #a7f3d0; }
.summ-input-panel:focus-within { border-color: #059669; }

.summ-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid #f3f4f6;
    background: #f8fafc;
}
.summ-panel-title   { font-size: 14px; font-weight: 800; color: #1f2937; }
.summ-panel-actions { display: flex; gap: 6px; }
.summ-icon-btn {
    background: #f3f4f6; border: 1.5px solid #e5e7eb;
    border-radius: 8px; padding: 5px 10px;
    font-size: 12px; font-weight: 600; color: #374151;
    cursor: pointer; transition: all 0.2s;
}
.summ-icon-btn:hover { border-color: #059669; color: #065f46; background: #f0fdf4; }

.summ-textarea {
    flex: 1;
    width: 100%;
    min-height: 260px;
    border: none;
    outline: none;
    padding: 16px;
    font-size: 15px;
    line-height: 1.7;
    color: #1f2937;
    resize: vertical;
    font-family: inherit;
    box-sizing: border-box;
}
.summ-textarea::placeholder { color: #9ca3af; }

.summ-panel-footer {
    display: flex;
    gap: 16px;
    padding: 8px 14px;
    border-top: 1px solid #f3f4f6;
    background: #f8fafc;
}
.summ-char-count, .summ-word-count { font-size: 12px; color: #9ca3af; font-weight: 600; }

/* Output */
.summ-output-wrap {
    flex: 1;
    min-height: 260px;
    display: flex;
    flex-direction: column;
}

.summ-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 30px 20px;
    color: #9ca3af;
    font-size: 14px;
    text-align: center;
}
.summ-placeholder-icon { font-size: 40px; }
.summ-placeholder-sub  { font-size: 12px; color: #d1d5db; }

/* Loading */
.summ-loading {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 30px;
}
.summ-loading-anim { display: flex; gap: 6px; }
.summ-loading-bar {
    width: 6px; height: 30px;
    background: #059669;
    border-radius: 4px;
    animation: summ-wave 1s ease-in-out infinite;
}
.summ-loading-bar:nth-child(2) { animation-delay: 0.15s; }
.summ-loading-bar:nth-child(3) { animation-delay: 0.3s; }
@keyframes summ-wave { 0%,100%{transform:scaleY(0.5);opacity:0.4} 50%{transform:scaleY(1.2);opacity:1} }
.summ-loading-text { font-size: 14px; color: #6b7280; font-weight: 500; }

/* Result */
.summ-result { padding: 20px 16px; }
.summ-result-text {
    font-size: 16px;
    line-height: 1.8;
    color: #1f2937;
    font-weight: 500;
    padding: 16px;
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
    border-radius: 12px;
    border-left: 4px solid #059669;
    margin-bottom: 12px;
    white-space: pre-wrap;
}
.summ-result-stats {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
}
.summ-result-stats span { background: #f3f4f6; padding: 4px 10px; border-radius: 20px; }

/* Error */
.summ-error {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    font-size: 14px;
    color: #dc2626;
    background: #fff5f5;
}

/* Controls */
.summ-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.summ-length-control { display: flex; align-items: center; gap: 10px; }
.summ-length-control label { font-size: 13px; font-weight: 700; color: #374151; white-space: nowrap; }
.summ-length-btns { display: flex; gap: 8px; }
.summ-len-btn {
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.2s;
}
.summ-len-btn small { font-size: 10px; font-weight: 400; color: #9ca3af; margin-top: 2px; }
.summ-len-btn:hover { border-color: #059669; color: #065f46; background: #f0fdf4; }
.summ-len-btn.active { background: linear-gradient(135deg, #059669, #047857); border-color: #047857; color: #fff; }
.summ-len-btn.active small { color: rgba(255,255,255,0.8); }

.summ-btn {
    background: linear-gradient(135deg, #059669, #047857);
    color: #fff; border: none; border-radius: 12px;
    padding: 14px 36px; font-size: 16px; font-weight: 800;
    cursor: pointer; transition: all 0.25s;
    box-shadow: 0 4px 16px rgba(5,150,105,0.3);
    margin-left: auto;
}
.summ-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(5,150,105,0.4); }
.summ-btn:disabled { opacity: 0.7; cursor: not-allowed; }

/* Use Cases */
.summ-usecases {
    background: linear-gradient(135deg, #f8fafc, #f0fdf4);
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
}
.summ-uc-title { font-size: 15px; font-weight: 800; color: #1f2937; margin-bottom: 14px; text-align: center; }
.summ-uc-grid  { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.summ-uc-item  {
    background: #fff; border-radius: 12px; padding: 14px 8px;
    text-align: center; border: 2px solid #e5e7eb;
    font-size: 26px; display: flex; flex-direction: column;
    align-items: center; gap: 6px; transition: all 0.2s;
}
.summ-uc-item:hover { border-color: #059669; transform: translateY(-2px); }
.summ-uc-item span  { font-size: 11px; font-weight: 700; color: #374151; line-height: 1.3; }
.summ-uc-item small { font-size: 10px; color: #9ca3af; font-weight: 400; }

/* Info Box */
.info-box { background: linear-gradient(135deg, #f0fdf4, #dcfce7); border-radius: 16px; padding: 28px; margin-bottom: 24px; }
.info-box h4 { color: #14532d; font-size: 20px; margin-bottom: 18px; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.info-item { background: #fff; border-radius: 12px; padding: 16px; color: #374151; font-size: 14px; line-height: 1.6; }
.info-item strong { display: block; color: #059669; font-size: 14px; font-weight: 700; margin-bottom: 4px; }

/* Responsive */
@media (max-width: 860px) {
    .summ-grid    { grid-template-columns: 1fr; }
    .summ-controls { flex-direction: column; align-items: flex-start; }
    .summ-btn     { margin-left: 0; width: 100%; }
    .summ-uc-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
    .summ-uc-grid   { grid-template-columns: repeat(2, 1fr); }
    .summ-length-control { flex-direction: column; align-items: flex-start; }
    .info-grid      { grid-template-columns: 1fr; }
}