/**
 * Accessibility CSS for Virgin Media Television Access Services
 * 
 * This file contains styles to maintain visual consistency while improving accessibility
 */

/* Email link styling - ensures links are distinguishable without relying on color */
#content_holder a[href^="mailto:"] {
  text-decoration: underline;
  font-weight: 400;
}

#content_holder a[href^="mailto:"]:hover,
#content_holder a[href^="mailto:"]:focus {
  text-decoration: underline;
}

/* Screen reader only class - visually hidden but accessible to screen readers */
/* .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
} */


/***************************************************/


.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #e20a0b;
    color: white;
    padding: 8px 12px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 10000;
    font-weight: bold;
}

.skip-link:focus {
    top: 6px;
    outline: 3px solid #ffbf47;
}

.sr-only,
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


button:focus,
input:focus,
select:focus,
textarea:focus,
[tabindex]:focus,
a:focus,
.show-card:focus,
.show-card__container:focus,
.navbar-brand:focus {
    outline: 3px solid #e20a0b;
    outline-offset: 3px;
    border-radius: 2px;
}

.navbar-nav a:focus {
    outline: 3px solid #e20a0b;
    outline-offset: 3px;
    border-radius: 4px;
    background-color: #e20a0b !important;
    color: #000 !important;
}

.show-card__container:focus {
    border-radius: 4px;
    box-shadow: 0 0 0 3px rgba(0, 95, 204, 0.3);
}

.navbar-brand:focus {
    background-color: rgba(0, 95, 204, 0.1);
}

.dark-bg button:focus,
.dark-bg input:focus,
.dark-bg a:focus,
.dark-bg [tabindex]:focus {
    outline: 3px solid #ffbf47;
}

input[type="radio"]:focus + label,
input[type="checkbox"]:focus + label {
    outline: 3px solid #e20a0b;
    outline-offset: 3px;
    border-radius: 4px;
}

#breaccrumb > a[href="/"]:focus {
    background-color: #000;
    color: #fff !important;
}


.show-card__container:focus .show-card__title {
    color: #000000;
}

.show-cards {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.show-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
}

.show-card:hover {
    background-color: #f8f9fa;
}

.show-card:focus,
.show-card.card-focused {
    box-shadow: 0 0 0 3px rgba(0, 95, 204, 0.3);
    transform: translateY(-2px);
}

.show-card[aria-hidden="true"] {
    display: none !important;
}

.show-card__container {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}

.show-card__title {
    color: #1a1a1a;
    margin-top: 0;
    font-weight: bolder;
}

.service-label {
    color: #333;
}

.service-value {
    color: #e20a0b;
}

.show-card__meta {
    color: #555;
}

#serviceFilters {
    margin: 1rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.show-card__services {
    padding-top: 0rem;
}

.show-card__services ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.show-card__services ul[aria-hidden='true'] {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

.show-card:focus .show-card__services ul[aria-hidden='true'],
.show-card:hover .show-card__services ul[aria-hidden='true'] {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    clip: auto;
    overflow: visible;
    border-top: 1px solid #eee;
    padding-top: 1.0rem;
}


.channel-filter {
    margin: 2rem 0 1rem 0;
    padding: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background-color: #f9fafb;
    position: relative;
}

.channel-filter legend {
    font-weight: 600;
    color: #111827;
    display: inline-block;
    line-height: 0;
    padding: 0;
    background-color: #f9fafb;
    margin-left: .5rem;
    margin-bottom: 5px;
}

.channel-filter label {
    margin-right: 1rem;
    cursor: pointer;
}

.channel-options {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem 1rem;
}

.radio-option {
    display: inline-flex;
    align-items: baseline;
    gap: .35rem;
}

#serviceFilters:focus-visible,
.channel-filter:focus-visible {
    outline: 3px solid #202020;
    outline-offset: 2px;
    border-radius: 6px;
}


label[for^="channel-"] {
    display: inline-block;
    padding: 8px 16px;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    background: white;
    transition: all 0.3s ease;
}


label[for^="channel-"]:hover,
label[for^="channel-"]:focus {
    border-color: #e20a0b;
    background-color: #f0f8ff;
    outline: none;
}


input[type="radio"]:checked+label {
    border-color: #e20a0b;
    background-color: #e20a0b;
    color: white;
}


label[for^="channel-"]:focus {
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.3);
}


#breaccrumb > a[href="/"] {
    color: #0056b3;
    text-decoration: underline;
    font-weight: 600;
    position: relative;
    padding-right: 5px;
}

#breaccrumb > a[href="/"]:hover,
#breaccrumb > a[href="/"]:focus {
    color: #003d82;
    text-decoration: none;
}

#breaccrumb > a[href="/"]::after {
    content: "›";
    margin-left: 5px;
    color: #666;
}


@media (max-width: 768px) {
    button:focus,
    input:focus,
    a:focus,
    [tabindex]:focus {
        outline: 4px solid #e20a0b;
        outline-offset: 2px;
    }

    
}


button,
input,
a,
[tabindex] {
	transition: outline-color 0.2s ease, outline-offset 0.2s ease;
}

/* ===== LINKS ===== */

a {
  color: #0056b3; 
  /* text-decoration: underline; */
  text-underline-offset: 0.2em;
  transition: color 0.2s ease, background-color 0.2s ease;
}


a:visited {
  color: #551a8b; 
}



 a:hover , a:focus, li:nth-child(2) > a[target="_BLANK"]:hover, li:nth-child(2) > a[target="_BLANK"]:focus, #gdpr_link:hover, #gdpr_link:focus {
  color: #fff ; 
  /* text-decoration: none; */
  background-color: #202020;
  outline: 2px solid #202020 ;
  outline-offset: 2px;
  border-radius: 4px;
} 
#breaccrumb a:hover, .fill-form a strong:hover, .fill-form a:focus strong {
  color: #fff !important; 
  text-decoration: none;
  background-color: #202020;
  outline-offset: 2px;
}

#breaccrumb .selectedBreadcrumb {
    color: #000000 !important;
    margin-left: 5px;
}


a[href^="mailto:"] {
  font-weight: 600; 
  color: #d64040; 
}

a[href^="mailto:"]:hover,
a[href^="mailto:"]:focus {
  color: #b32b2b; 
  background-color: #fff0f0; 
}


a[target="_blank"] {
  position: relative;
  padding-right: 15px;
}

a[target="_blank"]::after {
  content: "↗";
  position: absolute;
  right: 0;
  top: 0;
  font-size: 0.8em;
  line-height: 1;
}


/* a:focus {
  outline: 3px solid #0056b3;
  outline-offset: 2px;
} */


p a,
li a {
  font-weight: 600; 
}


@media (prefers-contrast: high) {
  a {
    text-decoration: underline 2px;
  }
  
  a:focus {
    outline: 3px solid #000000;
  }
}

.email-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
}

.email-link::before {
  content: "✉";
  font-size: 0.9em;
}


.email-link-alt {
  padding-left: 1.5em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='16' height='16'%3E%3Cpath fill='%230056b3' d='M12 12.713l-11.985-9.713h23.97l-11.985 9.713zm0 2.574l-12-9.725v15.438h24v-15.438l-12 9.725z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left center;
}

.email-link-alt:hover,
.email-link-alt:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='16' height='16'%3E%3Cpath fill='%23003d82' d='M12 12.713l-11.985-9.713h23.97l-11.985 9.713zm0 2.574l-12-9.725v15.438h24v-15.438l-12 9.725z'/%3E%3C/svg%3E");
}


.name-channel-heading:focus {
  outline: 3px solid #e20a0b !important;
  outline-offset: 3px !important;
  border-radius: 4px !important;
  background-color: rgba(0, 95, 204, 0.1) !important;
}


.name-channel-heading {
  outline: none;
  transition: all 0.2s ease;
}


.name-channel-heading:hover {
  background-color: rgba(0, 95, 204, 0.05);
}

.name-channel-heading:active {
  background-color: rgba(0, 95, 204, 0.15);
}



    
select {
    appearance: none; 
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 0.5rem 2rem 0.5rem 1rem; 
    border: 2px solid #e20a0b;
    border-radius: 4px;
    background-color: #ffffff;
    color: #000000;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%23e20a0b' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 12px 8px;
}

select:hover {
    background-color: #f0f6ff;
}

select:focus {
    outline: 3px solid #e20a0b;
    outline-offset: 3px;
    border-radius: 4px;
}

select:disabled {
    background-color: #f5f5f5;
    color: #888888;
    border-color: #cccccc;
    cursor: not-allowed;
    background-image: none;
}




.show-card.is-live {
  border: 3px solid #e20a0b;
  background: #fff4f4;
}

.show-card.is-live .live-label {
  color: #e20a0b;
  font-weight: bold;
  margin-left: 8px;
}