/* --- General Styles --- */
body {
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 900px;
    margin: 20px auto;
    padding: 0 15px;
}

hr {
    border: 0;
    height: 1px;
    background-color: #eee;
    margin: 20px 0;
}

/* --- Master List Styles (Adapted from tab1.page.scss) --- */
.hymn-list-item {
    display: flex;
    align-items: center;
    padding: 10px 5px;
    border-bottom: 1px solid #eee;
    height: 50px; /* From .my-custom-component */
    box-sizing: border-box;
    color: #333; /* Ensure text color is readable */
}

.hymn-list-item:hover {
    background-color: #f9f9f9;
}

.hymn-avatar {
    flex-shrink: 0;
    width: 40px;
    text-align: center;
    font-size: smaller; /* From inline style in tab1.page.html */
    margin-right: 15px; /* Spacing */
    color: #555; /* Slightly dimmer color for ID */
}

.hymn-title-container {
    flex-grow: 1;
    font-weight: 400; /* From inline style */
    margin-left: 0px; /* Adjusted from inline */
    text-align: left; /* From inline style */
    overflow: hidden; /* Prevent long titles breaking layout */
    white-space: nowrap;
    text-overflow: ellipsis;
}

.hymn-title-container p {
    margin: 0; /* Remove default margins */
    padding: 0; /* Remove default padding */
    font-size: large; /* From inline style */
}


.hymn-meta {
    flex-shrink: 0;
    text-align: right;
    font-size: x-small; /* From inline style */
    color: #666;
    margin-left: 10px;
}

/* --- Detail View Styles (Adapted from detail.page.scss) --- */
.hymn-detail-header {
    background-color: #3880ff; /* Primary color from Ionic */
    color: white;
    padding: 15px;
    text-align: center;
    border-radius: 4px 4px 0 0; /* Optional rounded top corners */
}

.hymn-detail-header h1 {
    margin: 0;
    font-size: 1.4em; /* Slightly larger */
    font-weight: 600;
}

.hymn-metadata-chips {
    padding: 15px; /* From .chips */
    background-color: #f4f4f4; /* Light background for metadata */
    border-bottom: 1px solid #ddd;
    border-left: 1px solid #ddd; /* Match border */
    border-right: 1px solid #ddd; /* Match border */
    display: flex;
    flex-wrap: wrap;
    gap: 10px; /* Space between chips */
    align-items: center; /* Vertically align items if they wrap */
}

.chip {
    background-color: #e0e0e0; /* Medium color */
    color: #333; /* Dark label */
    padding: 5px 12px;
    border-radius: 16px; /* Rounded corners */
    font-size: small;
    display: inline-flex; /* To align label and value */
    align-items: center;
    box-sizing: border-box;
}
.chip .label {
    color: #666; /* Medium color for label part */
    margin-right: 8px;
}
.chip .value {
    font-weight: 500;
}


.hymn-stanza-content {
    padding: 15px;
    text-align: justify; /* From #text */
    font-family: 'Roboto', sans-serif; /* From #text */
    border: 1px solid #ddd; /* Add border */
    border-top: none; /* Remove top border as it's handled by chips */
    border-radius: 0 0 4px 4px; /* Optional rounded bottom corners */
    margin-bottom: 15px; /* Space below content */
    /* Font size will be set inline via PHP style tag */
}

.hymn-stanza-content h2 { /* Style for stanza numbers if added in JSON */
    font-size: 1.1em;
    font-weight: bold;
    margin-top: 1em;
    margin-bottom: 0.5em;
    color: #3880ff; /* Match header color */
}
.hymn-stanza-content p {
    margin-bottom: 1em;
}
.hymn-stanza-content p:first-child {
    margin-top: 0; /* Remove extra space before first paragraph */
}

.back-link {
    display: inline-block;
    margin: 5px 10px 5px 0; /* Consistent margins */
    padding: 8px 15px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 4px;
    color: #333;
    font-size: 0.9em;
}
.back-link:hover {
    background-color: #e0e0e0;
}

.language-toggle-link {
     display: inline-block;
     margin: 15px 15px 0 15px;
     font-size: 0.9em;
     color: #3880ff;
}
.language-toggle-link:hover {
    text-decoration: underline;
}

/* --- Search Form Styles --- */
.search-form {
    margin: 15px 0;
    padding: 10px;
    background-color: #f8f8f8;
    border: 1px solid #eee;
    border-radius: 4px;
    display: flex; /* Align input and button */
    gap: 10px; /* Space between input and button */
}

.search-form input[type="text"] {
    flex-grow: 1; /* Input takes available space */
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
}

.search-form button {
    padding: 8px 15px;
    border: none;
    background-color: #3880ff; /* Primary color */
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
}

.search-form button:hover {
    background-color: #3171e0; /* Darker shade */
}

.search-results-info { /* Style for showing search results count */
     margin: 10px 0;
     padding: 0 5px; /* Align with list items */
     font-style: italic;
     color: #555;
}
.search-results-info a {
    color: #3880ff;
    text-decoration: none;
    margin-left: 10px;
}
.search-results-info a:hover {
    text-decoration: underline;
}


/* --- Favourite Button Styles --- */
.favourite-button {
    cursor: pointer;
    padding: 5px 10px; /* Adjust as needed */
    border-radius: 16px;
    background-color: #e0e0e0; /* Default state */
    color: #333;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid transparent; /* Prevent layout shift */
    transition: background-color 0.2s, color 0.2s;
    font-size: small; /* Match other chips */
    margin: 0; /* Remove default margin if inside flex */
}

.favourite-button.is-favourite {
    background-color: #eb445a; /* Ionic danger color for favourite */
    color: white;
}

.favourite-button .fav-icon::before {
    content: '♡'; /* Default: empty heart */
    font-size: 1.2em; /* Adjust icon size */
    line-height: 1; /* Prevent extra spacing */
}

.favourite-button.is-favourite .fav-icon::before {
    content: '♥'; /* Favourite: filled heart */
}

.favourite-button .fav-text {
    display: inline-block; /* Or block */
    line-height: 1; /* Prevent extra spacing */
}

/* --- Audio Player Styles --- */
.audio-player-container {
    margin: 15px; /* Add space around the player */
    border: 1px solid #eee; /* Optional border */
    padding: 10px;
    background-color: #f8f8f8;
    border-radius: 4px;
}

.audio-player-container audio {
    width: 100%; /* Make player responsive */
    display: block;
}