/* ===== AI CAPTION GENERATOR CSS ===== */

.cap-wrapper { margin-bottom: 28px; }

.cap-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* Card */
.cap-card {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 20px;
    padding: 24px;
    height: 100%;
}
.cap-result-card { border-color: #fbbf24; }
.cap-card-title  { font-size: 16px; font-weight: 800; color: #1f2937; margin-bottom: 20px; }

/* Fields */
.cap-field  { margin-bottom: 18px; }
.cap-label  { display: block; font-size: 13px; font-weight: 700; color: #374151; margin-bottom: 8px; }

.cap-textarea {
    width: 100%; min-height: 90px; border: 2px solid #e5e7eb;
    border-radius: 12px; padding: 12px; font-size: 14px;
    font-family: inherit; resize: vertical; outline: none;
    transition: border-color 0.2s; box-sizing: border-box; color: #1f2937;
    line-height: 1.6;
}
.cap-textarea:focus { border-color: #f59e0b; }
.cap-char-count     { font-size: 11px; color: #9ca3af; text-align: right; margin-top: 4px; }

/* Platform Buttons */
.cap-platform-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.cap-platform-btn {
    background: #f8fafc; border: 2px solid #e5e7eb; border-radius: 10px;
    padding: 8px 14px; font-size: 13px; font-weight: 600; color: #374151;
    cursor: pointer; transition: all 0.2s;
}
.cap-platform-btn:hover { border-color: #f59e0b; color: #92400e; }
.cap-platform-btn.active { background: linear-gradient(135deg,#f59e0b,#d97706); color: #fff; border-color: #d97706; }

/* Tone Buttons */
.cap-tone-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.cap-tone-btn {
    background: #f8fafc; border: 2px solid #e5e7eb; border-radius: 10px;
    padding: 8px 14px; font-size: 13px; font-weight: 600; color: #374151;
    cursor: pointer; transition: all 0.2s;
}
.cap-tone-btn:hover { border-color: #f59e0b; }
.cap-tone-btn.active { background: linear-gradient(135deg,#f59e0b,#d97706); color: #fff; border-color: #d97706; }

/* Language Buttons */
.cap-lang-grid { display: flex; gap: 8px; }
.cap-lang-btn {
    background: #f8fafc; border: 2px solid #e5e7eb; border-radius: 10px;
    padding: 8px 18px; font-size: 13px; font-weight: 700; color: #374151;
    cursor: pointer; transition: all 0.2s;
}
.cap-lang-btn:hover { border-color: #f59e0b; }
.cap-lang-btn.active { background: linear-gradient(135deg,#f59e0b,#d97706); color: #fff; border-color: #d97706; }

/* Generate Button */
.cap-generate-btn {
    width: 100%; background: linear-gradient(135deg,#f59e0b,#d97706);
    color: #fff; border: none; border-radius: 14px;
    padding: 16px; font-size: 17px; font-weight: 800;
    cursor: pointer; transition: all 0.25s; margin-top: 4px;
    box-shadow: 0 4px 16px rgba(245,158,11,0.35);
}
.cap-generate-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(245,158,11,0.45); }
.cap-generate-btn:disabled { opacity: 0.7; cursor: not-allowed; }

/* Placeholder */
.cap-placeholder { padding: 24px 16px; text-align: center; }
.cap-ph-icon { font-size: 48px; margin-bottom: 10px; }
.cap-ph-text { font-size: 16px; font-weight: 700; color: #374151; margin-bottom: 6px; }
.cap-ph-sub  { font-size: 13px; color: #9ca3af; margin-bottom: 18px; }
.cap-ph-examples { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cap-ph-ex {
    background: #fffbeb; border: 2px solid #fde68a; border-radius: 10px;
    padding: 10px 12px; font-size: 12px; font-weight: 600; color: #92400e;
    cursor: pointer; transition: all 0.2s; text-align: left;
}
.cap-ph-ex:hover { background: #fef3c7; border-color: #f59e0b; }

/* Loading */
.cap-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 20px; gap: 14px; }
.cap-loading-dots { display: flex; gap: 8px; }
.cap-loading-dots span {
    width: 10px; height: 10px; background: #f59e0b;
    border-radius: 50%; animation: cap-bounce 1.2s infinite;
}
.cap-loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.cap-loading-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes cap-bounce { 0%,80%,100%{transform:scale(0.7);opacity:0.5} 40%{transform:scale(1.2);opacity:1} }
.cap-loading-text { font-size: 14px; color: #6b7280; font-weight: 500; }

/* Results */
.cap-copy-all-row {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 14px; padding-bottom: 12px; border-bottom: 2px solid #fef3c7;
}
.cap-result-count  { font-size: 14px; font-weight: 800; color: #92400e; }
.cap-copy-all-btn {
    background: linear-gradient(135deg,#f59e0b,#d97706); color: #fff;
    border: none; border-radius: 8px; padding: 8px 16px;
    font-size: 13px; font-weight: 700; cursor: pointer; transition: all 0.2s;
}
.cap-copy-all-btn:hover { transform: translateY(-1px); }

/* Caption Items */
.cap-list { display: flex; flex-direction: column; gap: 12px; }
.cap-item {
    background: #fffbeb; border: 2px solid #fde68a; border-radius: 14px;
    padding: 14px 16px; display: flex; align-items: flex-start; gap: 12px;
    transition: border-color 0.2s;
}
.cap-item:hover { border-color: #f59e0b; }
.cap-item-num {
    background: linear-gradient(135deg,#f59e0b,#d97706); color: #fff;
    font-size: 12px; font-weight: 800; width: 24px; height: 24px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; margin-top: 1px;
}
.cap-item-text {
    flex: 1; font-size: 14px; color: #1f2937; line-height: 1.7;
    white-space: pre-wrap; word-break: break-word;
}
.cap-item-copy {
    background: #fff; border: 2px solid #fde68a; border-radius: 8px;
    padding: 6px 12px; font-size: 12px; font-weight: 700; color: #92400e;
    cursor: pointer; white-space: nowrap; transition: all 0.2s; flex-shrink: 0;
}
.cap-item-copy:hover { border-color: #f59e0b; background: #fef3c7; }

/* Error */
.cap-error {
    display: flex; align-items: center; gap: 8px; padding: 20px;
    background: #fff5f5; border-radius: 12px; color: #dc2626; font-size: 14px;
}

/* Info Box */
.info-box { background: linear-gradient(135deg,#fffbeb,#fef3c7); border-radius: 16px; padding: 28px; margin-bottom: 24px; }
.info-box h4 { color: #78350f; 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; font-size: 14px; color: #374151; line-height: 1.6; }
.info-item strong { display: block; color: #d97706; font-size: 14px; font-weight: 700; margin-bottom: 4px; }

/* Responsive */
@media (max-width: 860px) { .cap-grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) {
    .cap-ph-examples { grid-template-columns: 1fr; }
    .cap-lang-grid { flex-wrap: wrap; }
}