/* DLTK custom greeting cards: styles for cc1.php, cc2.php and env1.php (screen only; the printed pages use prtver.css). */

.cc-wrap { display: block; }
.cc-ad { display: none; }
@media (min-width: 1400px) {
  .cc-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 336px; column-gap: 24px; align-items: start; }
  .cc-ad { display: block; }
}

.cc-main { max-width: 920px; }
.cc-main h1 { margin: 0 0 12px; }
.cc-kicker { display: block; font-size: 12pt; color: #000; line-height: 1.6; }
.cc-main h3 { margin: 0 0 10px; font-size: 14pt; }
.cc-main h4 { margin: 14px 0 6px; font-size: 11pt; color: #444; }
.cc-note { font-size: 90%; color: #555; margin: 6px 0; }
.cc-warn { background: #fff3cd; border: 1px solid #e0c36a; padding: 8px 12px; }
.cc-notice { background: #fffbe6; border: 1px solid #e0d28a; padding: 10px 14px; margin: 0 0 18px; font-size: 90%; }

.cc-step { background: #fafafa; border: 1px solid #e3e3e3; border-radius: 6px; padding: 14px 16px; margin: 0 0 16px; }

/* card types */
.cc-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.cc-type { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; background: #fff; border: 1px solid #ddd; border-radius: 6px; cursor: pointer; }
.cc-type small { display: block; color: #666; font-size: 82%; margin-top: 2px; }
.cc-type:has(input:checked) { border-color: #0000ff; background: #f1f4ff; }

/* choice pills */
.cc-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.cc-pill input, .cc-tile input, .cc-title input { position: absolute; opacity: 0; pointer-events: none; }
.cc-pill span { display: inline-block; padding: 6px 12px; background: #fff; border: 1px solid #ccc; border-radius: 18px; cursor: pointer; }
.cc-pill input:checked + span { border-color: #0000ff; background: #f1f4ff; box-shadow: 0 0 0 1px #0000ff inset; }
.cc-pill input:focus-visible + span, .cc-tile input:focus-visible + img, .cc-title input:focus-visible + img { outline: 2px solid #0000ff; outline-offset: 2px; }

#ccTheme { font-size: 12pt; padding: 6px 8px; max-width: 100%; }

/* pictures */
.cc-group { margin: 14px 0 6px; padding: 4px 8px; background: #f0f0f0; font-size: 11pt; }
.cc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.cc-tile { position: relative; display: block; padding: 6px; background: #fff; border: 1px solid #ddd; border-radius: 6px; text-align: center; cursor: pointer; font-size: 90%; }
.cc-tile img { display: block; max-width: 100%; height: auto; margin: 0 auto 4px; border: 2px solid transparent; }
.cc-tile:has(input:checked) { border-color: #0000ff; background: #f1f4ff; }

/* The images are stored upside down so they print the right way up on the folded card.
   Turn them 180 degrees on screen so the previews read normally (the files themselves are not changed). */
.cc-tile img, .cc-title img, .cc-summary img { transform: rotate(180deg); }

/* titles */
.cc-titles { display: grid; gap: 6px; }
.cc-title { position: relative; display: grid; grid-template-columns: minmax(120px, 340px) 1fr; gap: 12px; align-items: center; padding: 6px 8px; background: #fff; border: 1px solid #ddd; border-radius: 6px; cursor: pointer; }
.cc-title img { display: block; max-width: 100%; height: auto; }
.cc-title em { color: #666; font-style: normal; }
.cc-title:has(input:checked) { border-color: #0000ff; background: #f1f4ff; }
@media (max-width: 600px) { .cc-title { grid-template-columns: 1fr; } }

.cc-go { margin: 18px 0; }
.cc-main button { font-size: 13pt; padding: 9px 20px; border: 1px solid #0a3d91; background: #1a56c4; color: #fff; border-radius: 6px; cursor: pointer; }
.cc-main button:hover { background: #0f46a8; }

/* screen 2 */
.cc-summary { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 0 0 16px; }
.cc-summary img { max-height: 110px; width: auto; border: 1px solid #ddd; background: #fff; }
.cc-summary .cc-summary-title { max-height: 50px; }
.cc-fields td { padding: 4px 8px 4px 0; vertical-align: middle; }
.cc-main textarea { width: 100%; max-width: 560px; font-size: 12pt; }
.cc-tips { margin: 8px 0 0; font-size: 90%; }
.cc-tips summary { cursor: pointer; color: #0000ff; }
.cc-opt { margin: 0 0 6px; }
.cc-prev { width: 348px; max-width: 100%; height: 339px; border: 1px dashed #999; background: #fff; overflow: hidden; }
.cc-prev-in { width: 100%; height: 100%; display: flex; flex-direction: column; box-sizing: border-box; padding: 4px; line-height: normal; overflow: hidden; word-wrap: break-word; }
.cc-prev table.urinvited { border-collapse: separate; border-spacing: 2px; width: 100%; line-height: 200%; }
.cc-prev td.urinvited { padding: 4px; }
.cc-printrow { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; margin: 0 0 14px; }
.cc-printrow button { flex: 0 0 280px; }
.cc-printrow p { flex: 1 1 260px; margin: 0; font-size: 95%; }

/* envelope screen */
.cc-env { border-collapse: collapse; }
.cc-env th { text-align: left; font-size: 90%; color: #555; padding: 0 8px 4px 0; }
.cc-env td { padding: 4px 8px 4px 0; }

/* the form shows only what money cards need when "Money Cards" is picked */
#ccForm.cc-is-money .cc-nomoney { display: none; }
