/* colours */
:root{
  --primary: #FFE9D2;
  --secondary: #FFE1C4;
  --title: #FF8816;
}

/* layout styles */
body {
  padding-top: 66px; /* Offset for fixed nav (56px nav + 10px border) */
}
nav{
  background: var(--primary);
  border-bottom: 10px solid var(--secondary);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
}
nav a{
  text-transform: uppercase;
  color: var(--title);
}
nav a span{
  font-weight: bold;
}
nav .sidenav-trigger{
  margin: 0;
}

.material-icons {
    display: inline-flex;
    vertical-align: top;
}

/* recipe styles */
.scores{
  margin-top: 20px;
}
.card-panel.score{
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0px 1px 3px rgba(90,90,90,0.1);
  display: grid;
  grid-template-columns: 2fr 4fr 1fr;
  grid-template-areas: "image details delete";
  position: relative;
}
.score img{
  grid-area: image;
  max-width: 60px;
}
.score-details{
  grid-area: details;
  margin-top: 6px;
}
.score-delete{
  grid-area: delete;
  position: absolute;
  bottom: 0px;
  right: 0px;
}
.score-delete i{
  font-size: 24px;
}
.score-title{
  font-weight: bold;
}
.score-info{
  font-size: 0.8em;
}

/* form-styles */
.add-btn{
  background: var(--title) !important;
}
input{
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
}
.side-form button{
  background: var(--title);
  box-shadow: 1px 1px 3px rgba(90,90,90,0.2);
}
form .input-field{
  margin-top: 30px;
}

/* Bottom Sheet Modal Styles */
.modal.bottom-sheet {
    border-radius: 16px 16px 0 0 !important;
    max-height: 85% !important;
    background-color: #fafafa;
}

.download-header {
    padding: 24px 24px 10px;
    border-bottom: 1px solid #e0e0e0;
    background: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.download-header h5 {
    margin: 0 0 8px 0;
    font-weight: 500;
    color: #333;
}

.download-header p {
    margin: 0;
    color: #757575;
    font-size: 0.9rem;
    line-height: 1.4;
}

.download-section {
    padding: 20px 24px 0;
}

.download-section h6 {
    font-weight: bold;
    color: #009688;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.download-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.download-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 10px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
}

.download-item:hover {
    background: #f5f5f5;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.download-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.download-voice-badge {
    background: #e0f2f1;
    color: #009688;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9rem;
}

.download-label {
    font-weight: 500;
}

.download-action {
    color: #009688;
}

/* Empty state styling */
.empty-message {
    text-align: center;
    color: #bdbdbd;
    padding: 20px;
    font-style: italic;
    background: #f9f9f9;
    border-radius: 8px;
}

/* Global locks */
.body-lock {
    overflow: hidden !important;
    height: 100vh !important;
    position: fixed !important;
    width: 100% !important;
}

/* Score View Styles */
#score-view {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: #212121;
    z-index: 9999 !important; /* Extremely high to cover everything */
    display: none;
    flex-direction: column !important;
    touch-action: none; /* Prevent browser gestures like pull-to-refresh */
}

.score-nav {
    height: 56px !important;
    background: #000;
    display: flex !important;
    align-items: center !important;
    padding: 0 5px !important; /* Reduced padding to give more space to title */
    justify-content: space-between !important;
    color: white !important;
    z-index: 10000 !important;
    flex-shrink: 0 !important;
    width: 100% !important;
}

.score-nav-btn {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.score-nav-title {
    font-size: 1.0rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    flex: 1 !important;
    margin: 0 !important;
    display: block !important;
    text-align: center !important;
    font-weight: 400;
}

.score-content {
    flex: 1 !important;
    position: relative !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: calc(100vh - 56px) !important;
}

.score-frame {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    background: white !important;
}

/* Image Zoom Container */
#score-img-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    touch-action: none; /* Crucial for custom touch handling */
    cursor: grab;
}

#score-img {
    max-width: 100%;
    max-height: 100%;
    user-select: none;
    pointer-events: none; /* Panzoom handling at container level */
    transition: transform 0.1s ease-out;
}

.score-controls {
    position: absolute;
    bottom: 30px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 1020;
}

.fab-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(0, 150, 136, 0.9);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    cursor: pointer;
}

.fab-btn:active {
    background: #00796b;
    transform: scale(0.95);
}

.fab-btn i {
    font-size: 24px;
}

/* Voice Selector (Horizontal row of chips/buttons) */
.voice-selector-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 15px 0 25px;
    padding: 0 5px;
}

.voice-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    color: #757575;
    transition: all 0.2s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    font-size: 0.9rem;
    min-width: 45px;
}

.voice-chip:hover {
    background: #eeeeee;
}

.voice-chip.active {
    background: #009688;
    color: white;
    border-color: #00796b;
    box-shadow: 0 2px 4px rgba(0, 150, 136, 0.3);
}

.voice-chip i {
    font-size: 1.1rem;
    margin-right: 4px;
}

