/*
=================================================
GLOBAL
=================================================
*/
html, 
body,
.main-content{
    height:100%;
}
body{
    display: flex;
    align-items: center;
    height: 100vh;
    background-color: #f4f4f4a0;
    margin: 0;
    margin-bottom:50px;
}
.title{
    text-transform: uppercase;
    font-size: 28px;
    font-weight: 700;
}

/*
=================================================
NAVIGATION MENU
=================================================
*/
.nav-skinny {
    width: 35px;
    background-color: #343a40;
    color: white;
    height:100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0;
    position: fixed;
    z-index:1000001;
    top:0;
    left:0;
}
.nav-skinny a {
    color: white;
    text-decoration: none;
    padding: 10px;
    text-align: center;
    width: 100%;
}
.nav-skinny a.active {
    background-color: #495057;
}
.nav-skinny a:hover {
    background-color: #495057;
}
#home_icon{
    background-color:#343a40 !important;
}
/* Initial flash animation */
.flash {
    animation: flash-bg 2s ease-in-out infinite;
}

/* Keyframes for the flashing effect */
@keyframes flash-bg {
    0%, 100% {
        background-color: #343a40; /* Original background color */
    }
    50% {
        background-color: #8e44ad; /* Vibrant purple flash */
    }
}

/* General styles for the icon */
.icon {
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 21px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

/* Stop flashing */
.clicked {
    animation: none;
    background-color: #343a40; /* Return to original color */
}
.expanded-nav {
    width: 0;
    overflow: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background-color: #495057;
    color: white;
    position: fixed;
    top: 0;
    left: 34px;
    height: 100%;
    transition: width 0.3s ease;
    z-index:1000002;
}
.expanded-nav.open {
    width: 300px;
}
.expanded-nav p{
    font-size:.8em !important;
    color:#adb5bd;
}

.word-box {
    font-size: 2rem;
    font-weight: bold;
    padding: 15px 30px;
    display: inline-block;
    transform: rotate(var(--rotate));
    height:fit-content;
}


/*
=================================================
BUTTONS
=================================================
*/
.bg-primary{
    background-color:#8e44ad !important;
}
.btn-primary:hover{
    background-color:#984fb7;
    border-color:#9849b9;
}
.btn-primary,
.btn-primary:active,
.btn-primary:focus-visible,
.form-check-input:checked{
    background-color: #8e44ad !important;
    border-color:#8e44ad !important;
}
.form-check-input:focus {
    box-shadow: 0 0 0 .25rem rgba(167, 55, 182, 0.15) !important;
    border-color:#8e44ad;
    color: #8e44ad;
}
.form-switch .form-check-input:focus {
    --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280, 0, 0, 0.25%29'/%3e%3c/svg%3e");
}
.form-switch .form-check-input:focus:checked {
    --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
    background-color: #8e44ad !important;
}
.btn:disabled{
    background-color: #936ca4 !important;
    border-color:#936ca4  !important;
}
.form-control:focus{
    border-color:#936ca4 !important;
    box-shadow:0 0 0 .25rem rgba(167, 55, 182, 0.15)
}

/*
=================================================
CONTAINER TOOLBAR
=================================================
*/
.container-toolbar{
    position:fixed;
    bottom:30px;
    right:30px;
    cursor:pointer;
}
.container-toolbar i{
    font-size:21px;
    opacity:.8;
    margin:5px;
}

.container-toolbar i:hover{
    opacity:1;
}
/*
=================================================
ROTATE
=================================================
*/
.rotate-handle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    cursor: pointer;
    color:#999;
    font-size:16px;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease-in-out, visibility 0.15s ease-in-out;
}
/*
=================================================
IMAGE ASSETS
=================================================
*/
.image-container {
    width: 125px; /* Set desired width */
    height: 125px; /* Set desired height */
    overflow: hidden;
    display:inline-block;
    margin:3px;;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Crops the image while maintaining aspect ratio */
}
.displayed-image{
    width:100%;
    height:100%;
}
.image-wrapper {
    position: relative;
    display: inline-block;
    width:250px;
}
.trash {
    position: absolute;
    bottom: 5px;
    right: 5px;
    cursor: pointer;
    color: #FFFFFF;
    font-size: 1.2rem;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.3);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease-in-out, visibility 0.15s ease-in-out;
}

.image-wrapper:hover > .trash,
.image-wrapper:hover > .rotate-handle,
.word-box:hover > .trash,
.word-box:hover > .rotate-handle {
    opacity: 1;
    visibility: visible;
}


/*
=================================================
RULER
=================================================
*/
#wordContainer{
    width: 100%;
    max-width:816px;
    height:1056px;
    margin:0 auto 50px auto;
    margin-left: calc(50% + 35px);
    transform: translateX(-50%);
    position: relative;
    background: white;
    border: 1px dashed #ccc;
    overflow: hidden;  
    padding:24px;
}
.ruler {
    position: absolute;
    background: #ddd;
    z-index:1000000;
}
.ruler.horizontal {
    width: 100%;
    height: 20px;
    top: 0;
    left: 0;
    border-bottom: 1px solid #aaa;
    display: flex;
    align-items: center;
}
.ruler.vertical {
    width: 20px;
    height: 100%;
    top: 0;
    left: 0;
    border-right: 1px solid #aaa;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.ruler div {
    font-size: 10px;
    color: #333;
    position: absolute;
}
.vertical div{
    border-bottom:1px solid #999;
    width:100%;
    padding-bottom:4px;
}
.vertical div:first-of-type{
    padding-top:2px;
    padding-bottom:2px;
}
.horizontal div{
    border-right:1px solid #999;
    height:100%;
    padding-right:4px;
    padding-top:2px;
}
@media print {
  * {
    -webkit-print-color-adjust: exact !important; /* Ensures background colors print */
    print-color-adjust: exact !important;
  }
  body{
    background-color: #FFF;
  }
  body * {
    visibility: hidden;
  }

  #wordContainer, #wordContainer * {
    visibility: visible;
  }
  #wordContainer .ruler,
  #wordContainer .ruler *{
    visibility:hidden !important;
  }
  
  #wordContainer {
    position: absolute;
    left: 0;
    top: 0;
    width: 8.5in;
    max-width:8.5in;
    margin-left:0;
    border:none;
    transform:none;
    height:auto;
    page-break-inside: avoid; /* Prevent content from splitting across pages */
  }

  @page {
    size: 8.5in auto; /* Auto height based on content */
    margin: 0in; /* Add margins to prevent content cutoff */
  }
}