/*
Theme Name: newcss
Theme URI: https://github.com/davidmytton/new.css-wordpress
Author: David Mytton
Author URI: https://davidmytton.blog
Description: A lightweight, minimalist WordPress theme based on https://newcss.net. Autodetects and updates to light/dark mode based on the user setting.
Tags: blog, one-column, custom-menu, featured-image-header, featured-images
Version: 1.0.2
Requires at least: 5.4
Tested up to: 5.4
Requires PHP: 7.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: newcss
*/

/* Customisations to make new.css more suitable for blog content */

header h1 a {
    color: var(--nc-tx-1);
}

article h2 a {
    color: var(--nc-tx-1);
    text-decoration: none;
}

nav a {
    padding-right: 0.5em;
}

figcaption {
    font-size: small;
}
img {
    max-width: 100%;
    height: auto;
}
iframe {
    max-width: 100%;
}

/* 
Content Width Config
https://codex.wordpress.org/Content_Width
*/
.size-auto, 
.size-full,
.size-large,
.size-medium,
.size-thumbnail {
	max-width: 100%;
	height: auto;
}

/* 
WordPress Core
https://codex.wordpress.org/CSS 
*/
.alignnone {
    margin: 5px 20px 20px 0;
}

.aligncenter,
div.aligncenter {
    display: block;
    margin: 5px auto 5px auto;
}

.alignright {
    float:right;
    margin: 5px 0 20px 20px;
}

.alignleft {
    float: left;
    margin: 5px 20px 20px 0;
}

a img.alignright {
    float: right;
    margin: 5px 0 20px 20px;
}

a img.alignnone {
    margin: 5px 20px 20px 0;
}

a img.alignleft {
    float: left;
    margin: 5px 20px 20px 0;
}

a img.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.gallery-caption
.bypostauthor
.wp-caption {
    background: #fff;
    border: 1px solid #f0f0f0;
    max-width: 96%; /* Image does not overflow the content area */
    padding: 5px 3px 10px;
    text-align: center;
}

.wp-caption.alignnone {
    margin: 5px 20px 20px 0;
}

.wp-caption.alignleft {
    margin: 5px 20px 20px 0;
}

.wp-caption.alignright {
    margin: 5px 0 20px 20px;
}

.wp-caption img {
    border: 0 none;
    height: auto;
    margin: 0;
    max-width: 98.5%;
    padding: 0;
    width: auto;
}

.wp-caption p.wp-caption-text {
    font-size: 11px;
    line-height: 17px;
    margin: 0;
    padding: 0 4px 5px;
}

.sticky { color:red; }

/* 
Text meant only for screen readers.
https://make.wordpress.org/accessibility/handbook/markup/the-css-class-screen-reader-text/ 
*/
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #eee;
    clip: auto !important;
    clip-path: none;
    color: #444;
    display: block;
    font-size: 1em;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000; /* Above WP toolbar. */
}