/* Ship Tea Headline Generator — Scoped Styles */

.shiptea-hg-wrapper {
    --st-ocean: #0077B6;
    --st-teal: #008080;
    --st-sunset: #FF6B35;
    --st-sand: #FFF1E6;
    --st-navy: #023E73;
    --st-white: #ffffff;
    --st-red: #C0392B;

    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 680px;
    margin: 2rem auto;
    padding: 0 1rem;
    box-sizing: border-box;
    color: var(--st-navy);
}

.shiptea-hg-wrapper *, .shiptea-hg-wrapper *::before, .shiptea-hg-wrapper *::after {
    box-sizing: border-box;
}

/* Header */
.shiptea-hg-header {
    text-align: center;
    margin-bottom: 2rem;
}

.shiptea-hg-header h2 {
    font-size: 1.8rem;
    color: var(--st-navy);
    margin: 1rem 0 0.75rem;
}

.shiptea-hg-subtitle {
    font-size: 1.05rem;
    color: #555;
    margin: 0;
    line-height: 1.5;
}

/* Breaking news ticker */
.shiptea-hg-ticker {
    overflow: hidden;
    background: var(--st-red);
    color: var(--st-white);
    padding: 8px 0;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.shiptea-hg-ticker-text {
    display: inline-block;
    white-space: nowrap;
    animation: sthg-ticker 15s linear infinite;
}

@keyframes sthg-ticker {
    0%   { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* Controls */
.shiptea-hg-controls {
    background: var(--st-sand);
    border-radius: 16px;
    padding: 2rem;
    border: 2px solid var(--st-ocean);
    margin-bottom: 1.5rem;
}

.shiptea-hg-select-group {
    margin-bottom: 1.25rem;
}

.shiptea-hg-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--st-teal);
    margin-bottom: 0.4rem;
}

.shiptea-hg-select {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    border: 2px solid #ddd;
    border-radius: 10px;
    background: var(--st-white);
    color: var(--st-navy);
    appearance: auto;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s;
}

.shiptea-hg-select:focus {
    border-color: var(--st-ocean);
    outline: none;
}

.shiptea-hg-btn-row {
    display: flex;
    gap: 0.75rem;
}

.shiptea-hg-generate-btn {
    flex: 1;
    padding: 14px 24px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--st-white);
    background: var(--st-sunset);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.shiptea-hg-generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,107,53,0.35);
}

.shiptea-hg-random-btn {
    padding: 14px 20px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--st-ocean);
    background: var(--st-white);
    border: 2px solid var(--st-ocean);
    border-radius: 50px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    font-family: inherit;
}

.shiptea-hg-random-btn:hover {
    background: var(--st-ocean);
    color: var(--st-white);
}

/* Newscard output */
.shiptea-hg-output {
    animation: sthg-fadeIn 0.5s ease-out;
}

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

.shiptea-hg-newscard {
    background: var(--st-white);
    border: 3px solid var(--st-navy);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 6px 25px rgba(2,62,115,0.15);
    margin-bottom: 1rem;
}

.shiptea-hg-newscard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: var(--st-navy);
    color: var(--st-white);
}

.shiptea-hg-breaking {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 3px;
    background: var(--st-red);
    padding: 3px 10px;
    border-radius: 3px;
    animation: sthg-flash 1.5s ease-in-out infinite;
}

@keyframes sthg-flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.shiptea-hg-source {
    font-size: 0.85rem;
    font-weight: 600;
    font-style: italic;
}

.shiptea-hg-headline {
    font-size: 1.5rem;
    line-height: 1.35;
    font-weight: 800;
    color: var(--st-navy);
    padding: 1.5rem 1.25rem;
    margin: 0;
    font-family: Georgia, 'Times New Roman', serif;
    min-height: 80px;
}

.shiptea-hg-headline .sthg-cursor {
    display: inline-block;
    width: 3px;
    height: 1.2em;
    background: var(--st-navy);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: sthg-blink 0.7s step-end infinite;
}

@keyframes sthg-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.shiptea-hg-newscard-footer {
    display: flex;
    justify-content: space-between;
    padding: 8px 16px;
    font-size: 0.75rem;
    color: #888;
    border-top: 1px solid #eee;
}

/* Share buttons */
.shiptea-hg-output-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.shiptea-hg-share-btn {
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.2s;
    color: var(--st-white);
    font-family: inherit;
}

.shiptea-hg-share-btn:hover { opacity: 0.85; }
.shiptea-hg-share-twitter { background: #1a1a1a; }
.shiptea-hg-share-facebook { background: #1877F2; }
.shiptea-hg-share-threads { background: #000000; }
.shiptea-hg-share-tiktok { background: #010101; }
.shiptea-hg-share-instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.shiptea-hg-share-copy { background: var(--st-teal); }

/* Responsive */
@media (max-width: 768px) {
    .shiptea-hg-header h2 { font-size: 1.5rem; }
    .shiptea-hg-controls { padding: 1.5rem 1.25rem; }
    .shiptea-hg-headline { font-size: 1.25rem; padding: 1.25rem 1rem; }
}

@media (max-width: 400px) {
    .shiptea-hg-wrapper { padding: 0 0.5rem; }
    .shiptea-hg-btn-row { flex-direction: column; }
    .shiptea-hg-headline { font-size: 1.1rem; }
    .shiptea-hg-newscard-header { flex-direction: column; gap: 4px; text-align: center; }
}
