/*
Theme Name: Sovereign Redeemer
Theme URI: https://sovereignredeemerbooks.com/
Author: Built for Sovereign Redeemer Books
Description: Reproduces the original sovereignredeemerbooks.com design in WordPress, reusing the site's own stylesheet. Provides blog posts by year, a Books post type with author filtering, and Thoughts.
Version: 1.4.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: sovereign-redeemer
*/

/* ---------------------------------------------------------------------------
   The bulk of the styling comes from assets/app.css, which is the original
   site's stylesheet copied verbatim. What follows is the handful of rules the
   old templates declared inline, plus the small amount of glue WordPress needs.
   --------------------------------------------------------------------------- */

/* --- book cover cards (was inline in views/books/book-list.php) --- */
.book-cover-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 400px;
}

.book-cover {
    position: relative;
    border-radius: 2px;
    background-color: black;
    box-shadow: 0 0 10px rgba(0, 0, 0, .49);
    z-index: 2;
    padding: 55px 25px;
    width: 285px;
    height: 327px;
}

.book-cover .book-title {
    color: white;
    text-transform: uppercase;
    font-size: 20px;
}

.book-cover .book-subtitle {
    font-weight: 300;
    font-size: 16px;
}

#app div.book-cover {
    cursor: pointer;
}

#author {
    font-size: 22px;
    font-weight: 700;
}

/* --- shared page chrome (was inline in blog.php / show.php / book-list.php) --- */
.description {
    margin-top: 56px;
}

main > h1 {
    margin: 2rem auto;
}

.post-body > p:not(:first-child) {
    text-indent: 2em;
    margin-top: .5em;
}

/* --- WordPress-generated markup needs a few defaults app.css never had --- */
.post-body p {
    margin-bottom: .5em;
}

.post-body blockquote,
.post-body .wp-block-quote {
    border-left: 4px solid #b8c2cc;
    padding-left: 1rem;
    margin: 1rem 0;
    font-style: italic;
}

.post-body a {
    color: #2779bd;
}

.post-body ul,
.post-body ol {
    margin: 1rem 0 1rem 2rem;
}

.post-body ul { list-style: disc; }
.post-body ol { list-style: decimal; }

.post-body img,
.post-body figure img {
    max-width: 100%;
    height: auto;
}

.post-body figure {
    margin: 1rem 0;
}

.post-body .has-text-align-center {
    text-align: center;
}

/* Alignment classes the block editor may emit. */
.alignleft  { float: left;  margin: 0 1rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1rem; }
.aligncenter { display: block; margin: 1rem auto; }

/* Accessibility helper WordPress expects to exist. */
.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

/* Pagination, when a listing is long enough to need it. */
.srb-pagination {
    margin: 2rem 0;
    text-align: center;
}

.srb-pagination .page-numbers {
    display: inline-block;
    padding: .4rem .8rem;
    margin: 0 .2rem;
    text-decoration: none;
    color: #2779bd;
}

.srb-pagination .page-numbers.current {
    background: #2779bd;
    color: #fff;
    border-radius: 3px;
}

/* ---------------------------------------------------------------------------
   Landing page (front-page.php).

   The homepage content is edited as a normal WordPress page, so the styling
   that used to be inline utility classes lives here instead. Colours are the
   exact values from the original app.css:
     text-red-dark  #cc1f1a     bg-blue-darker #1c3d5a   bg-blue-dark #2779bd
     bg-red-darker  #621b18     bg-red-dark    #cc1f1a
   --------------------------------------------------------------------------- */

.srb-landing h1 {
    font-size: 3rem;
    margin-bottom: .5rem;
}

.srb-landing h2 {
    font-size: 3rem;
    color: #cc1f1a;
}

.srb-landing > p {
    margin-top: 1rem;
}

/* Core button blocks on the landing page.

   The two calls to action are real WordPress Button blocks now, so they appear
   as buttons in the editor and can be reordered with the block mover. This just
   constrains their width to match the original design. */
.srb-landing .wp-block-buttons {
    margin-top: 2rem;
    width: 100%;
}

@media (min-width: 576px) {
    .srb-landing .wp-block-buttons {
        width: 60%;
        margin-left: auto;
        margin-right: auto;
    }
}

.srb-landing .wp-block-button__link {
    border-radius: .25rem;
    text-decoration: none;
}

/* Legacy: the original CTA styling, kept so any page still using the
   "srb-cta" classes keeps working. New content should use Button blocks. */
.srb-cta {
    margin-top: 2rem;
}

.srb-cta a {
    display: block;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    border-radius: .25rem;
    color: #fff;
    text-decoration: none;
}

@media (min-width: 576px) {
    .srb-cta a {
        width: 60%;
    }
}

.srb-cta-books a {
    background-color: #1c3d5a;
    font-size: 1.5rem;
    padding-top: .75rem;
    padding-bottom: .75rem;
}

.srb-cta-books a:hover {
    background-color: #2779bd;
}

.srb-cta-blog a {
    background-color: #621b18;
    font-family: Georgia, "Times New Roman", serif;
    padding-top: .5rem;
    padding-bottom: .5rem;
}

.srb-cta-blog a:hover {
    background-color: #cc1f1a;
}

/* Editable introduction at the top of /blog/, pulled from the "Blog" page. */
.srb-blog-intro {
    margin-bottom: 2rem;
}

/* Let the editor's own alignment choices apply here. */
.srb-blog-intro .has-text-align-center { text-align: center; }
.srb-blog-intro .has-text-align-left   { text-align: left; }
.srb-blog-intro .has-text-align-right  { text-align: right; }
