/*
 * Theme Name:  KRMG (Newsreader Child)
 * Theme URI:   https://newsreader.codesupply.co/
 * Description: Newsreader Child Theme
 * Author:      Code Supply Co.
 * Author URI:  https://codesupply.co/
 * Template:    newsreader
 * Version:     1.0.0
 */

/* Copy any classes from parent theme here. They will override the parent's version. */

.cs-header__custom-button {
	display: inline-flex !important;
	white-space: nowrap;
}

/* Announcement Bar */
.krmg-announcement-bar {
	background-color: #1a1a1a;
	color: #fff;
	padding: 6px 0;
	font-size: 0.875rem;
	text-align: center;
}

.krmg-announcement-bar p {
	margin: 0;
}

.krmg-announcement-bar a {
	color: #fff;
	text-decoration: underline;
}

.krmg-announcement-bar a:hover {
	color: #fff;
	opacity: 0.8;
}

/* Breaking News Bar */
.krmg-breaking-news {
	background-color: var(--cs-color-accent, #cc0100);
	color: #fff;
	padding: 6px 0;
	font-size: 0.875rem;
}

.krmg-breaking-news .cs-container {
	display: flex;
	align-items: center;
	gap: 8px;
}

.krmg-breaking-news__label {
	font-weight: 700;
	white-space: nowrap;
	flex-shrink: 0;
}

.krmg-breaking-news__text {
	overflow: hidden;
	min-width: 0;
	flex: 1 1 0;
}

.krmg-breaking-news__track {
	display: inline-flex;
	align-items: center;
	white-space: nowrap;
}

.krmg-breaking-news__item {
	color: #fff;
	text-decoration: none;
	white-space: nowrap;
}

.krmg-breaking-news__item:hover {
	text-decoration: underline;
	color: #fff;
}

.krmg-breaking-news__track .krmg-breaking-news__sep {
	margin: 0 12px;
	opacity: 0.6;
	flex-shrink: 0;
}

@keyframes krmg-scroll-single {
	0%, 5%  { transform: translateX(0); }
	100%    { transform: translateX(-100%); }
}

.krmg-breaking-news--scrolling .krmg-breaking-news__track {
	animation: krmg-scroll-ticker var(--krmg-ticker-duration, 20s) linear 1s infinite;
}

.krmg-breaking-news:hover .krmg-breaking-news__track {
	animation-play-state: paused;
}

/* Header Phone Link */
.krmg-header-phone {
	display: flex;
	align-items: center;
    margin: 0 5px;
	text-decoration: none;
	font-size: 0.875rem;
	font-weight: 500;
	white-space: nowrap;
}

/* Share Buttons */
.krmg-share-buttons {
    margin: 64px 0 20px 0;
}

.krmg-share-buttons__inner {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.krmg-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.krmg-share-btn:hover {
    opacity: 0.85;
    color: #fff;
}

.krmg-share-btn--facebook { background-color: #1877F2; }
.krmg-share-btn--x { background-color: #000; }
.krmg-share-btn--linkedin { background-color: #0A66C2; }
.krmg-share-btn--email { background-color: #555; }

/* App Store Links (Footer) */
.krmg-app-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-right: 20px;
}

.krmg-app-link img {
	height: 40px;
	width: auto;
}

/* Ensure footer right column wraps app-links above social icons on mobile */
.cs-footer__item-bottom-bar .cs-col-right {
	flex-wrap: wrap;
}

/* Station Logos Bar (above footer) */
.krmg-station-bar {
	background-color: #fff;
	border-top: 1px solid #e0e0e0;
	padding: 24px 0;
}

.krmg-station-bar .cs-container {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 32px;
	flex-wrap: wrap;
}

.krmg-station-bar__link {
	display: inline-flex;
	align-items: center;
	line-height: 0;
}

.krmg-station-bar__link img {
	height: 48px;
	width: auto;
	object-fit: contain;
}

.krmg-station-bar__link.zmg img {
	height: 32px;
}

/* -------------------------------------------------------
   Responsive Styles
   Breakpoints (from Newsreader parent theme):
     sm:  576px
     md:  768px
     lg:  992px
     xl:  1200px
     xxl: 1448px
   ------------------------------------------------------- */

/* -- max-width: 575.98px (xs — phones) -- */
@media (max-width: 575.98px) {
	.krmg-announcement-bar {
		font-size: 0.75rem;
		padding: 4px 0;
	}

	.krmg-breaking-news {
		font-size: 0.75rem;
	}

	.krmg-header-phone {
		display: none;
	}

	.krmg-share-buttons__inner {
		grid-template-columns: repeat(2, 1fr);
	}

	.krmg-share-buttons {
		margin: 32px 0 16px 0;
	}

	.krmg-app-links {
		justify-content: center;
		margin-right: 0;
		margin-bottom: 16px;
		width: 100%;
	}

	.krmg-app-links span {
		width: 100%;
		text-align: center;
	}

	.krmg-app-link img {
		height: 34px;
	}

	.krmg-station-bar .cs-container {
		gap: 20px;
	}

	.krmg-station-bar__link img {
		height: 36px;
	}
}

/* -- max-width: 767.98px (below md — phones / small tablets) -- */
@media (max-width: 767.98px) {
	.krmg-share-btn {
		font-size: 0.8125rem;
		padding: 8px;
	}

	.cs-header__custom-button {
		padding: 0.5rem 1rem;
	}
}

/* -- max-width: 1199.98px (below xl) -- */
@media (max-width: 1199.98px) {
	.krmg-app-links {
		margin-right: 0;
		margin-bottom: 12px;
		width: 100%;
	}
}

/* -- max-width: 991.98px (below lg — tablets) -- */
@media (max-width: 991.98px) {
	.krmg-breaking-news:not(.krmg-breaking-news--scrolling) .krmg-breaking-news__track {
		animation: krmg-scroll-single 12s linear 0.5s infinite;
	}

	.krmg-share-buttons__inner {
		grid-template-columns: repeat(3, 1fr);
	}

	.krmg-station-bar__link img {
		height: 40px;
	}

	.krmg-station-bar .cs-container {
		gap: 24px;
	}
}