/*
Theme Name: Cookin Dev Theme
Text Domain: cookin-dev
Version: 1.0
Author: DoshCook
*/

@import url('https://fonts.googleapis.com/css2?family=Mochiy+Pop+P+One&display=swap');

:root {
  --main-text: #20242a;
  --main-background: #f2f4f6;
  --card-background: #fffffe;
  --background-accent: #00ebc7;
  --link: #ff5470;
  --link-text: #ff5470;
  --title: #6f6f70;
  --accent-text: #27b19d;
  --quote-background: #d9d4e7;
  --memo-background: #dceced;
  --alert-text: #ff5470;
  --alert-background: #ffd9d9;
  --secondary-background: #d9d4e7;
  --secondary-text: #6f6f70;
  --accent: #fde24f;
  --theme-icon: url('/images/sun.svg');
  --dosh: #00C6D2;
  --honey: #d8ba27;
}

:root[data-theme="dark"]  {
  --main-text: #fdfdfd;
  --main-background: #3c444d;
  --card-background: #333333;
  --background-accent: #d8ba27;
  --link-text: #f9d0dd;
  --link: #bb2658;
  --title: #f2f4f6;
  --accent-text: #27b19d;
  --quote-background: #444e5c;
  --memo-background: #404c4d;
  --alert-text: #ffedf1;
  --alert-background: #db8282;
  --secondary-background: #d9d4e7;
  --secondary-text: #6f6f70;
  --accent: #a28c20;
  --theme-icon: url('/images/moon.svg');
  --dosh: #00C6D2;
  --honey: #d8ba27;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="light"] {
      --main-text: #fdfdfd;
      --main-background: #f2f4f6;
      --card-background: #fffffe;
      --background-accent: #00ebc7;
      --link: #ff5470;
      --link-text: #ff5470;
      --title: #6f6f70;
      --accent-text: #27b19d;
      --quote-background: #d9d4e7;
      --memo-background: #dceced;
      --alert-text: #ff5470;
      --alert-background: #fff4f4;
      --secondary-background: #d9d4e7;
      --secondary-text: #6f6f70;
      --accent: #fde24f;
      --theme-icon: url('/images/sun.svg');
      --dosh: #00C6D2;
      --honey: #d8ba27;
  }
  :root {
      --main-text: #fdfdfd;
      --main-background: #3c444d;
      --card-background: #333333;
      --background-accent: #ebcc30;
      --link-text: #f9d0dd;
      --link: #bb2658;
      --title: #f2f4f6;
      --accent-text: #27b19d;
      --quote-background: #444e5c;
      --memo-background: #404c4d;
      --alert-text: #ffedf1;
      --alert-background: #db8282;
      --secondary-background: #d9d4e7;
      --secondary-text: #6f6f70;
      --accent: #d3ba3f;
      --theme-icon: url('/images/moon.svg');
      --dosh: #00C6D2;
      --honey: #d8ba27;
  }
}

body {
  background-color: var(--main-background);
  color: var(--main-text);
}

a {
  -webkit-transition: all 0.3s ease;
  -moz-transition: all 0.3s ease;
  -o-transition: all 0.3s ease;
  transition: all  0.3s ease;
  color: var(--main-text);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

pre {
  display: table;
  table-layout: fixed;
  max-width: 95%;
  width: calc(100% - 2em);
  border-radius: 8px;
  padding: 0.5em 1em;
}

p {
  line-height: 1.8rem;
  color: var(--text);
}

code {
  border: 1px solid var(--accent-text);
  border-radius: 2px;
  margin: 0 0.1em;
  padding: 0.1em 0.2em;
  color: var(--accent-text);
}

pre code {
  display: block;
  border: none;
  border-radius: 0;
  color: black;
  overflow-x: scroll;
}

blockquote {
  position: relative;
  margin: 3em 2em;
  padding: 2em;
  background-color: var(--quote-background);
  color: var(--text);
}

blockquote::before,
blockquote::after {
  content: ' ';
  width: 40px;
  height: 40px;
  position: absolute;
}

blockquote::before {
  border-top: 2px solid var(--secondary-background);
  border-left: 2px solid var(--secondary-background);
  top: -10px;
  left: -10px;
}

blockquote::after {
  border-bottom: 2px solid var(--secondary-background);
  border-right: 2px solid var(--secondary-background);
  bottom: -10px;
  right: -10px;
}

table {
  border-collapse: collapse;
  font-size: .95em;
  line-height: 1.5;
  word-break: normal;
  width: 100%;
}

td, th {
  padding: .5rem;
  border: 3px solid var(--main-background);
  background: var(--card-background);
}

th {
  background: var(--secondary-background);
}

/*
  Common
*/

#container {
  display: flex;
  position: relative;
  flex-flow: row;
  min-height: 100vh;
}

/* #container::before {
  content: '';
  border-radius: 60%;
  position: fixed;
  top: -20vw;
  left: -40vw;
  z-index: -1;
  width: 100vw;
  height: 100vw;
  background-color: var(--background-accent);
} */


.site-marker {
  width: 20px;
  flex-shrink: 0;
  background-color: var(--accent);
}

.sidebar {
  width: 250px;
  flex-shrink: 0;
}

.main-container {
  flex: 1 1 auto;
  position: relative;
}

.right-sidebar {
  width: 100px;
  flex-shrink: 0;
  background-color: var(--accent);
}

.main-inner {
  padding: 1em 2em;
}

.card {
  padding: 1em 1.5em;
  border-radius: 8px;
  background-color: var(--card-background);
}

@media only screen and (max-width: 768px) {
  #container {
    flex-flow: column;
  }

  header {
    order: 0;
    width: 100%;
    height: 25px;
  }

  .sidebar {
    width: 100%;
    height: auto;
    order: 1;
  }

  .main-container {
    width: 100%;
    order: 2;
  }

  .main-inner {
    padding: 1em;
  }

}

/*
  Sidebar
*/

.sidebar-inner {
  position: sticky;
  top: 3em;
  margin: 1em 0em 1em 2em;
}

.site-title {
  display: flex;
  font-size: 36px;
  font-weight: bold;
  color: var(--title);
  font-family: 'Mochiy Pop P One', sans-serif;
  text-decoration: none;
}

.site-title:hover {
  color: var(--link);
}

.site-title img {
  position: relative;
  top: -4px;
  left: 10px;
  margin-right: 8px;
  width: 30px;
  height: 30px;
}

.categories {
  display: flex;
  flex-flow: row;
  flex-wrap: wrap;
  justify-content: space-around;
  padding: 0;
}

.cat-item {
  display: flex;
  flex-flow: row;
  align-items: center;
  justify-content: center;
  width: 48%;
  height: 100px;
  list-style-type: none;
  margin: 3px 0;
}

.cat-item a {
  display: flex;
  flex-flow: column;
  align-items: center;
  justify-content: center;
  color: var(--secondary-text);
  text-decoration: none;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  transition: 0.2s;
}

.current-cat a {
  background-color: var(--accent);
  color: var(--link);
}

.cat-item a:hover {
  background-color: var(--accent);
}

.cat-item .cat-item-icon {
  font-size: 30px;
}

.cat-title {
  margin-top: 8px;
  font-size: 1rem;
}

@media only screen and (max-width: 768px) {

  .sidebar-inner  {
    position: relative;
    top: 0;
    margin: 1em;
    padding: 0;
  }
}

/* outline */
.outline-container {
  padding: 0.8em 1.5em;
  border-radius: 8px;
  background-color: var(--card-background);
  overflow-y: scroll;
  max-height: 30vh;
}

.outline-container a {
  text-decoration: none;
  color: var(--secondary-text);
  font-size: 0.8rem;
}

.outline-container a:hover, .outline-container a:focus {
  color: var(--link);
}

.outline ul {
  padding: 0;
}

.outline li {
  list-style-type: none;
  text-indent: -1em;
  padding-left: 1em;
}

@media only screen and (max-width: 768px) {
  .outline-container {
    overflow: visible;
    max-height: none;
  }
}

/*
* Search Box
*/

.searchform {
  display: flex;
  flex-flow: row;
  position: relative;
  box-sizing: border-box;
  justify-content: space-around;
  padding: 3px 10px;
  border-radius: 2em;
  height: 40px;
  overflow: hidden;
  background: var(--secondary-background);
  color: var(--secondary-text);
  margin: 2em 0;
}

.searchform input[type="text"] {
  flex: 1 1 auto;
  border: none;
  height: 100%;
  margin-left: 5px;
  background: var(--secondary-background);
  width: 80%;
  color: var(--secondary-text);
}

.searchform input[type="text"]:focus {
  outline: 0;
  background: none;
}

.searchform input[type="submit"] {
  width: 50px;
  cursor: pointer;
  font-family: 'Font Awesome 6 Free';
  font-weight: 600;
  font-size: 16px;
  border: none;
  background: none;
  color: var(--secondary-text);
  outline : none;
  vertical-align: baseline;
}

input::placeholder {
  color: var(--secondary-text);
}

.searchform::-webkit-input-placeholder {
  color: var(--secondary-text);
}


/*
  Right Sidebar
*/



/*
  Content Front
*/

.article-list {
  display: flex;
  flex-flow: row;
  flex-wrap: wrap;
  justify-content: left;
  gap: 25px;
}

.article-list .card {
  width: calc(100% / 3 - 50px - 1em);
  min-width: 220px;
  -webkit-transition: all 0.3s ease;
  -moz-transition: all 0.3s ease;
  -o-transition: all 0.3s ease;
  transition: all  0.3s ease;
}

.article-content {
  text-decoration: none;
}

@media only screen and (min-width: 768px) {
  .article-list .card:hover, .article-list .card:focus {
    box-shadow: 0px 0px 8px rgba(172, 172, 172, 0.25);
    transform: rotate(5deg);
  }

  .article-content:hover, .article-content:focus {
    color: var(--link);
  }
}

.article-list article {
  position: relative;
  display: flex;
  flex-flow: column;
  padding-top: 20px;
}

.article-list article::before {
  content: "●";
  position: absolute;
  top: -14px;
  left: -14px;
  font-size: 20px;
  color: var(--main-background);
}

.article-list img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 3px;
}

.post-icatch-none {
  display: flex;
  flex-flow: column;
  width: 100%;
  height: 200px;
  background-color: var(--memo-background);
  border-radius: 3px;
  text-align: center;
  justify-content: center;
  align-items: center;
}

.post-icatch-none .cat-title {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--accent-text);
}

.cat-others::before {
  position: relative;
  content: '\f700';
  font: var(--fa-font-solid);
}

.cat-flutter::before {
  position: relative;
  content: '\f52d';
  font: var(--fa-font-solid);
}

.cat-android::before {
  position: relative;
  content: '\f17b';
  font: var(--fa-font-brands);
}

.cat-swift::before {
  position: relative;
  content: '\f4ba';
  font: var(--fa-font-solid);
}

.cat-website::before {
  position: relative;
  content: '\f390';
  font: var(--fa-font-solid);
}

.post-icatch-none .cat-item-icon::before {
  font-size: 4rem;
  color: var(--accent-text);
}


.article-list time::before,
.single-article time::before {
  content: '\f017';
  font-family: 'Font Awesome 6 Free';
  margin-right: 0.5em;
}

.article-list time,
.single-article time {
  font-size: 0.8rem;
  font-weight: bold;
  color: var(--secondary-text);
}

.article-list h2 {
  font-size: 1.4rem;
  margin: 0.4em 0;
}

@media only screen and (max-width: 768px) {
  .article-list {
    position: relative;
    flex-flow: column;
  }

  .article-list .card {
    width: auto;
    margin: 0;
  }
}

/* Tags */

.tags {
  display: flex;
  flex-flow: row;
  justify-content: left;
  gap: 4px;
  margin: 0.5em 0;
}

.tags a {
  font-size: 12px;
  font-weight: bold;
  color: var(--secondary-text);
  text-decoration: none;
  transition: 0.2s;
}

.tags a:hover, .tags a:focus {
  color: var(--link);
}

/*
  Content Single
*/
.single-article {
  position: relative;
}

.single-article .card {
  margin: 1em 1em;
  padding: 2em 3em;
}

.single-article .card::before {
  content: "●";
  position: absolute;
  top: 8px;
  left: 30px;
  font-size: 20px;
  color: var(--main-background);
}

.single-article h2 {
  background: var(--main-background);
  margin-top: 2em;
  padding: 16px 18px;
  border-radius: 4px;
  border-left: 8px solid var(--secondary-background);
}

.single-article h2:first-child {
  margin-top: 1em;
}

.single-article h3 {
  background: var(--main-background);
  padding: 8px 18px;
  border-radius: 4px;
}

@media only screen and (max-width: 768px) {
  .single-article .card {
    margin: 1em 0;
    padding: 2em 1.5em;
    overflow: scroll;
  }

  .single-article .card::before {
    left: 14px;
  }
}

/*
  BreadCrumb
*/
.breadcrumb ul {
  display: flex;
  flex-flow: row;
  padding-left: 1em;
  font-size: 0.8rem;
  color: var(--link-text);
  margin: 0 1em;
}

.breadcrumb li {
  list-style-type: none;
  text-indent: -1em;
  margin: 0 1em;
}

.breadcrumb li::before {
  content: '\f105';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  padding-right: 1em;
}

.breadcrumb li:first-child::before {
  content: '\f2e7';
  font-family: 'Font Awesome 6 Free';
}

.breadcrumb a {
  text-decoration: none;
  color: var(--text);
}

@media only screen and (max-width: 768px) {

  .breadcrumb {
    margin: 0;
  }

  .breadcrumb ul {
    display: flex;
    flex-flow: column;
  }
}

/*
  Pagination
*/

.next-prev {
  display: flex;
  flex-flow: row;
  justify-content: space-between;
  gap: 20px;
  margin: 1em;
}

.next-prev-content {
  flex: 1 1 auto;
  display: flex;
  flex-flow: column;
}

.next-prev-content span {
  font-size: 0.8rem;
  font-family: 'Mochiy Pop P One', sans-serif;
  font-style: italic;
  color: var(--secondary-text);
}

.next-prev-content {
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: bold;
}

.next-prev-content:hover,
.next-prev-content:focus,
.front-pagination a:hover,
.front-pagination a:focus {
  color: var(--link);
}

.front-pagination a {
  font-size: 1.6rem;
  font-family: 'Mochiy Pop P One', sans-serif;
  font-style: italic;
  color: var(--secondary-text);
  text-decoration: none;
}

.front-pagination .prev {
  text-align: right;
}

@media only screen and (max-width: 768px) {
  .next-prev {
    flex-flow: column;
    margin: 0;
  }

  .front-pagination {
    flex-flow: row;
    margin: 1em;
  }
}

/*
  Footer
*/
footer {
  text-align: center;
}

footer a {
  text-decoration: none;
}

/*
  404
*/
.content-404 {
  display: flex;
  flex-flow: column;
  align-items: center;
  justify-content: center;
  min-height: 90vh;
  font-size: 1rem;
  font-weight: bold;
  color: var(--secondary-text);
}

.content-404 img {
  width: 80px;
  -webkit-animation: spinner 100ms ease-in-out infinite;
  animation: spinner 100ms ease-in-out infinite;
}

.back-home {
  display: inline-block;
  margin-top: 2em;
  padding: 0.5em 1em;
  text-decoration: none;
  border-radius: 8px;
  color: var(--secondary-text);
  background-color: var(--secondary-background);
}

.back-home:hover {
  cursor: pointer;
}

/*
 ShortCode
*/
/* メモ */
.memo {
  position: relative;
  background-color: var(--memo-background);
  margin: 2em 0;
  padding: 1em;
  border-radius: 8px;
  font-size: 1rem;
}

.alert {
  background-color: var(--alert-background);
}

.memo-title {
  font-size: 1.2rem;
  color: var(--accent-text);
}

.memo-title::before {
  content: '\f06c';
  font: var(--fa-font-solid);
  font-size: 26px;
  color: var(--accent-text);
  vertical-align: bottom;
  padding-right: 8px;
}

.memo-alert-title {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--alert-text);
}

.memo-alert-title::before {
  content: '\f071';
  font: var(--fa-font-solid);
  font-size: 26px;
  color: var(--alert-text);
  vertical-align: bottom;
  padding-right: 8px;
}

.search-style {
  display: flex;
  flex-flow: column;
  align-items: flex-start;
  padding: 1em;
  background-color: var(--memo-background);
  border-radius: 8px;
}

.search-style-head {
  color: var(--secondary-text);
  font-size: 12px;
  margin: 4px 0;
  padding: 2px;
}

.search-style-content-wrap {
  display: flex;
  flex-flow: row;
  align-items: center;
  align-content: flex-start;
  gap: 16px;
  background-color: var(--main-background);
  padding: 1em;
  border-radius: 8px;
}

.search-style-content {
  width: auto;
  background-color: var(--main-background);
  padding: 1em;
  border-radius: 8px;
}

/*タイムライン*/
.post .tl {
  margin: 1em 0;
  padding: 1em;
}

.tl-content {
  position: relative;
  padding: 0 0 0 2em;
}

.tl-content:before {
  content: "";
  width: 6px;
  background: var(--memo-background);
  display: block;
  position: absolute;
  top: 36px;
  bottom: 0;
  left: 8px;
}

.tl-content:last-of-type::before {
  content: none;
}

.tl-marker::before {
  content: '\e005';
  font: var(--fa-font-solid);
  font-size: 26px;
  color: var(--accent-text);
  display: block;
  position: absolute;
  top: 6px;
  left: -12px;
}

.tl-content:last-of-type .tl-marker::before {
  content: '\e006';
}

.tl-label {
  padding: 8px;
  color: var(--secondary-text);
  font-size: 16px;
  font-weight: bold;
}

.tl-title {
  padding: 0 8px;
  font-size: 1.4rem;
  font-weight: bold;
}

.tl-main {
  font-size: 1rem;
  margin: 8px;
}

/* コード */
.code-filename {
  position: relative;
  top: 0.6em;
  left: 8px;
  display: inline-block;
  padding: 8px 16px;
  background-color: var(--accent-text);
  border-radius: 8px 8px 0 0;
  font-size: 14px;
  font-weight: bold;
  color: var(--main-background);
}

.code-filename::before {
  content: '\f15b';
  font: var(--fa-font-solid);
  font-size: 16px;
  color: var(--main-background);
  margin-right: 4px;
}

/* マーカー */
.marker {
  background: linear-gradient(transparent 60%, var(--dosh) 50%);
}

.marker-dosh {
  background: linear-gradient(transparent 60%, var(--dosh) 50%);
}

.marker-honey {
  background: linear-gradient(transparent 60%, var(--honey) 50%);
}

/*
 Animation
*/

@-webkit-keyframes spinner {
  0% {
    -webkit-transform: rotate(0deg);
  }
  1% {
      -webkit-transform: rotate(20deg);
  }
  10% {
      -webkit-transform: rotate(0deg);
  }
  20% {
      -webkit-transform: rotate(-10deg);
  }
  30% {
      -webkit-transform: rotate(0deg);
  }
  100% {
      -webkit-transform: rotate(0deg);
  }
}
@keyframes spinner {
  0% {
      transform: rotate(0deg);
  }
  1% {
      transform: rotate(30deg);
  }
  10% {
      transform: rotate(0deg);
  }
  20% {
      transform: rotate(-10deg);
  }
  30% {
      transform: rotate(0deg);
  }
  100% {
      transform: rotate(0deg);
  }
}
