:root {
  --primary-color: #007bff;
  --accent-color: #28a745;
  --background-color: #f5f5f5;
  --text-color: #333333;
  --nav-background: #ffffff;
  --nav-color: #666666;
}

body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Container for everything */
.dial-pad-container {  
  overflow: auto;
  padding-bottom: 100px;
}

/* Header / Nav */
.dial-pad-header {
  background-color: #f5f5f5;
  padding: 0.5rem;
}

.dial-pad-header ul {
  list-style: none;
  display: flex;
  justify-content: space-around;
  margin: 0;
  padding: 0;
}

.dial-pad-header li {
  padding: 0.5rem;
}

.dial-pad-header li.active {
  border-bottom: 3px solid #007bff;
}

/* Phone number input area */
.input-area {
  padding: 1rem;
  text-align: center;
  border-bottom: 1px solid #e0e0e0;
}

.phone-input {
  width: 100%;
  padding: 0.5rem;
  font-size: 2rem;
  text-align: center;
  border: none;
  border-radius: 4px;
}

/* Call button */
.call-button-container {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.call-button {
  background-color: #28a745;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 70px;
  height: 70px;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.call-button:hover {
  background-color: #218838;
}

/* MDI icon sizing inside buttons */
.call-button i {
  font-size: 24px;
}

.dial-pad-header li i {
  font-size: 20px;
}

#acting-as-number {
  padding: 1rem;
}

#call-from {
  padding: 0.5rem 1rem;
}

#call-to {
  padding: 0.5rem 1rem;
}

#number-info {
  padding: 0.5rem;
}

.sitecodeicon {
  color: #aba9ad;
  font-size: .7rem;
  line-height: 1;
  padding: 0;
  margin: 0;
  text-align: center;
}

.sitecodeicon img {
  margin-bottom: 3px;
  object-fit: cover;
  object-position: top;
  border: 1px solid #9f9f9f;
  border-radius: 100%;
  height: 3rem;
  width: 3rem;
}

.sitecodeicon.bigicon img {
  height: 5rem;
  width: 5rem;
}

.sitecodeandicon {
  display: inline-flex;
  align-items: center;
}

.iconside { 
  margin-right: 20px; 
}

.textside { 
  text-align: left; 
}

.small-text {
  font-size: .8rem;
}

a {
  text-decoration: none;
  color: #007bff;
}

.call-direction-text {
  color: #bebebe;
  font-size: .8rem;
  text-align: center;
  padding: 0;
}

.cursorpointer {
  cursor: pointer;
}

/* Phone-like Container */
.phone-container {
  width: 375px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* When screen width is near the container width, remove shadow and border radius */
@media screen and (max-width: 600px) {
  .phone-container {
    width: 100%;
    box-shadow: none;
    border-radius: 0;
  }
}

/* Content Container inside the phone */
#content-container {
  flex: 1;
  overflow: hidden;
  padding-bottom: 70px; /* Space for bottom-nav height */
}

/* Section Styling */
.page-section {
  display: none;
  padding: 0;
  height: 100%;
  overflow: hidden;
}

.page-section.active {
  display: flex;
  flex-direction: column;
}

/* Bottom Navigation Styling */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-around;
  background: #fff;
  border-top: 1px solid #ccc;
  padding: 1rem 0;
  z-index: 1000;
}

.bottom-nav .nav-button {
  background: none;
  border: none;
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  padding: 0.5rem;
  cursor: pointer;
  outline: none;
}

.bottom-nav .nav-button {
  color: var(--nav-color); 
}

.bottom-nav .nav-button i {
  font-size: 1.8rem;
}

.bottom-nav .nav-button.active {
  color: #007aff;
}

.red-nav-button.nav-button {
  color: #ff3b30;
}

.bottom-nav .nav-button span {
  color: inherit;
}
.bottom-nav .nav-button i {
  color: inherit;
}

.resourceinfobox {
  text-align: center;
}

#active-call-container {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  width: 100%;
  height: 100vh;
  background-color: #686868;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #fff;
  padding: 2rem 1rem;
  overflow: visible;
}

#active-call-container .resourceinfobox {
  color:white; 
}

#active-call-container.ringing {
  animation: backgroundPulse 1s infinite ease-in-out;
}

.hiddenitem {
  display: none !important;
}

#active-call-container.modal-call-display {
  display: flex !important;
}

#active-call-container .caller-info {
  text-align: center;
}

#active-call-container .caller-name {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

#active-call-container .call-status {
  padding-bottom: 10px;
  font-size: 1rem;
  opacity: 0.7;
  text-align: center; 
}

#active-call-container .incoming-text {
  padding-bottom: 10px;
  font-size: 1rem;
  opacity: 0.7;
}

#active-call-container .call-text {
  font-size: 1.3rem;
  opacity: 0.9;
}

#active-call-container .buttons {
  display: flex;
  gap: 2rem;
  margin-bottom: 3rem;
}

#active-call-container .call-button {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: none;
  outline: none;
  cursor: pointer;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#active-call-container .decline {
  background-color: #ff3b30;
}

#active-call-container .hangup {
  background-color: #ff3b30;
}

#active-call-container .mute.microphoneoff {
  background-color: rgba(255,255,255, 0.9);
  color: #ff3b30;
}

#active-call-container .answer {
  background-color: #4cd964;
  position: relative;
  z-index: 1;
}

#active-call-container.ringing .answer {
  animation: buttonPulse 2s infinite;
}

#active-call-container .mute {
  background-color: rgba(255,255,255,0.2);
}

#active-call-container .keypad {
  background-color: rgba(255,255,255,0.2);
}

#active-call-container .call-button .mdi {
  font-size: 36px;
}

#active-call-container .btn-label {
  font-size: 0.7rem;
}

#active-call-container .call-button:hover {
  box-shadow: 0 0 10px rgba(255,255,255,0.2);
}



.timertext {
  font-size: 2rem;
  font-weight: 600;
}

.keys {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 2rem;
  justify-items: center; /* Horizontal centering in cells */
  align-items: center; /* Vertical centering in cells */
}

.key {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: none;
  outline: none;
  cursor: pointer;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.key .number {
  font-size: 1.7rem;
  font-weight: 400;
}

.key:hover { 
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2); 
}

.dial-pad-container .key {
  background-color: #d8d8d8;
  box-shadow: none;
  color: #000000;
}

.dial-pad-container .key:hover {
  background-color: #c8c8c8;
}

.dial-pad-container .key .letters {
  color: #000000;
}

.key.noback {
  background-color: transparent;
  box-shadow: none;
}

.letters {
  display: block;
  font-size: 0.7rem;
  color: white;
  margin-top: 0rem;
  font-weight: 400;
}

#buttonspressed {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  text-align: center;
}

/* Style for the main container holding all call items */
#today-call-actions-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 10px;
}

/* Style for each individual call item */
.call-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem;
  border-bottom: 1px solid #eee;
  cursor: pointer;
}

.call-item.highlighted {
  background-color: rgba(0, 123, 255, 0.1);
}

/* Style for the first column (circle and optional muted text) */
.column-1 {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 72px;
  text-align: center;
}

/* Style for the circular image or generated icon */
.circle {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  overflow: hidden;
}

/* Ensure the image covers the circle properly */
.circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Style for the muted text below the circle (e.g., site code) */
.muted-text {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-top: 0.25rem;
}

/* Style for the second column (person name, entity name, and badge) */
.column-2 {
  flex: 1;
}

/* Style for the person's name */
.person-name {
  font-weight: bold;
  font-size: 1.1rem;
}

/* Style for the entity name (e.g., site, company, or lead) */
.entity-name {
  font-size: 0.9rem;
  color: #333;
}

/* Style for the badge (e.g., action type with icon) */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.8rem;
  color: white;
  margin-top: 0.5rem;
}

/* Space between the icon and text in the badge */
.badge i {
  margin-right: 0.25rem;
}

/* Style for the third column (time ago) */
.column-3 {
  font-size: 0.8rem;
  color: #666;
}

.pagetitle {
  padding-bottom: 1rem;
}

.totals-container {
  display: flex;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid #eee;
  color: #666;
}

.tealicon {
  color: white;
  background-color: #168477;
  padding: 0.15rem 0.25rem;
  border-radius: 25%;
}

.renewalicon {
  background: rgb(0, 175, 70);
  padding: 0rem 0.1rem;
  color: white;
  border-radius: 3px;
}

.blueicon {
  color: white;
  background-color: #0c43b0;
  padding: 0.15rem 0.25rem;
  border-radius: 25%;
}

.blackicon {
  color: white;
  background-color: #333;
  padding: 0.15rem 0.25rem;
  border-radius: 25%;
}

/* Fixed header for #today-section */
.fixed-header {
  background-color: var(--background-color, #f5f5f5);
  padding: 10px;
  position: sticky;
  top: 0;
  z-index: 10;
}

/* Wrapper for scrollable content in #today-section */
#today-call-actions-wrapper {
  position: relative;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

#upcoming-actions-wrapper {
  position: relative;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}


/* Refresh indicator styles */
.refresh-indicator {
  position: absolute;
  top: 0;
  left: 42%;
  transform: translateX(-50%);
  transition: transform 0.3s ease-out;
  font-size: 60px;
  color: rgb(96, 96, 110)
}

.refresh-indicator.hiddenitem {
  display: none;
}

.mdi-spin {
  animation: spin 1s linear infinite;
}

.duration { padding-top: 10px; }

.empty-text {
  text-align: center;
  padding: 1rem;
  color: #666;
  font-size: 1rem;
}

.container {
  padding: 20px;
}
#logged-in-caller-info-content .resourceinfobox {
  text-align: left;
  padding-top: 20px;
}

#upcoming-actions-content, #today-call-actions-content{
  padding-bottom: 100px;
}



#transfer-options {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(54, 0, 93, 0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.transfer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem 2rem;
  padding: 1rem;
  max-height: 80%;
  overflow-y: auto;
}

.resource-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.resource-item img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
}

.resource-item span {
  margin-top: 0.5rem;
  color: white;
  font-size: 0.9rem;
}

/* Ensure the Cancel button aligns with other call buttons */
#transfer-options .buttons {
  margin-top: 1rem;
}

#transfer-options .call-button.decline {
  background-color: #ff3b30;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#transfer-options .call-button.decline .mdi {
  font-size: 36px;
}

#call-info-boxes {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  height: 100%;
  width: 100%;
  justify-content: center;
  align-items: center;
}

#normal-call-info {
  flex: 1;
  justify-content: center;
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

#call-waiting-section {
  flex: 1;
  justify-content: center;
  align-items: center;
  display: flex;
  flex-direction: column;
  background-color: #3b5998; /* Stormy blue color */
  padding: 0;
  width: 100%;
  border-top: 1px solid #fff;
  gap: 1rem;
}
.incomingtext {
  font-size: 2rem;
  font-weight: 600;
  color: rgba(255,255,255, 0.3);
  text-align: center;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

/* Keyframes for a pulsing background effect */
@keyframes backgroundPulse {
  0%, 100% {
    background-color: #6e6c84;
  }
  50% {
    background-color: #5f5e6b; 
  }
}

/* Keyframes for the 'Answer' button pulsing */
@keyframes buttonPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(76, 217, 100, 0.7);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 15px rgba(76, 217, 100, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(76, 217, 100, 0);
  }
}