/* ICONS FOR SITE ARE FROM https://www.svgrepo.com/collection/solar-broken-line-icons/4 */

*,
*::before,
*::after {
    box-sizing: border-box;
  transition: all 0.5s ease-in-out !important;
}

a, img, button, input, select, textarea, .btn {
  transition: all 0.5s ease-in-out !important;
}

body, html {
    font-family: "Nunito Sans", sans-serif;
    margin: 0;
    padding: 0;
    height: 100%;
    background: #e8e8e8;
}

#stored-filename {
    font-family: "Arvo", serif;
	font-weight: bold;
}

h1, h2, h3, h4, h5  {
	display: flex;
	align-items: center;
	justify-content: flex-start;
    font-family: "Arvo", serif;
	font-weight: normal;
}

.header-img {
	width: 25px;
	height: 25px;
	margin-right: 10px;
}

.logo {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.head-logo {
  font-size: 1.3vw;
  display: flex;
  font-family: "Arvo", serif;
  font-weight: bold;
  letter-spacing: 0.5px;
  align-items: center;
  justify-content: center;
}

.icon-logo {
  width: 25px;
  height: 25px;
  margin-right: 10px;
}

.date-stamp {
	font-size: 0.75em;
	color: rgba(255,255,255,0.45);
}

a {
    text-decoration: none;
    color: inherit;
}

.layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 220px;
    background: #262a49;
    color: #fff;
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
    z-index: 10;
}

.side-name {
	color: rgba(255,255,255,0.5);
	margin-top: 5px;
	margin-bottom: 15px;
	font-size: 0.85rem;
	width: 100%;
	text-align: center;
}

.sidebar h1 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: #ff6e6e;
}

.sidebar nav {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar nav a {
	display: flex;
	align-items: center;
	justify-content: flex-start;
    padding: 10px;
    border-radius: 4px;
    color: #fff;
    transition: background 0.5s ease;
}

.sidebar nav a:hover {
    background: #30355c;
    transition: background 0.5s ease;
}

.nav-icon { 
	margin-right: 5px;
	width: 20px;
	height: 20px;
}


.copy-icon { 
	width: 25px !important;
	height: 25px !important;
}

.sidebar footer {
    font-size: 0.8rem;
    color: #aaa;
    margin-top: auto;
}

/* Main Content */
.main-content {
    margin-left: 220px;
    flex-grow: 1;
    padding: 2rem;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
}

.manage-btn {
	margin-left: 20px;
	background: #293661;
	padding: 8px 10px;
	border: none;
	border-radius: 5px;
	color: #fff;
	font-size: 0.85em;
	font-weight: bold;
}

.upload-btn {
    background: #435182;
	padding: 8px 10px;
	border: none;
	border-radius: 5px;
	color: #fff;
	font-size: 0.85em;
	font-weight: bold;
}

/* Shared button base */
.btn, .delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: none;
  border-radius: 5px;
  color: #fff;
  font-size: 0.85em;
  font-weight: 600;
  cursor: pointer;
  text-transform: uppercase;
  transition: background 0.2s ease, transform 0.1s ease;
  line-height: 1;              /* ensures equal height */
  min-width: 120px;            /* optional, for symmetry */
}

/* Rename (primary) */
.btn {
  background: #293661;
}

.btn:hover {
  background: #38447a;
  transform: translateY(-1px);
}

/* Delete (danger) */
.delete-btn {
  background: #612933;
}

.delete-btn:hover {
  background: #7a3440;
  transform: translateY(-1px);
}

.action-row form button {
  all: unset;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 5px;
  font-size: 0.85em;
  font-weight: 600;
  cursor: pointer;
  text-transform: uppercase;
  line-height: 1;
  min-width: 120px;
  color: #fff;
  background: #612933;
  transition: background 0.2s ease, transform 0.1s ease;
}

.action-row form button:hover {
  background: #7a3440;
  transform: translateY(-1px);
}

/* Keep them evenly spaced */
.action-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.notification.success {
    background: #38a169;
    color: #fff;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-weight: bold;
    animation: fadeOut 4s ease forwards;
}
@keyframes fadeOut {
    0%, 80% { opacity: 1; }
    100% { opacity: 0; display: none; }
}


/* force rename form and its contents to align left */
#rename-form-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* left-aligns flex children */
  justify-content: flex-start;
  text-align: left;
}

#rename-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;  /* key line */
  justify-content: flex-start;
  text-align: left;
}

#rename-form input[type="text"] {
  align-self: flex-start;   /* keeps input from centering */
  margin: 0;
}

#rename-form button {
  align-self: flex-start;   /* keeps buttons from centering */
}.notification-wrapper {
  width: 100%;
  margin-bottom: 20px;
}

.notification {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  padding: 0px 10px; /* was 8px, reduced vertical padding */
  font-size: 0.9em;
  line-height: 1;
  border-radius: 10px;
}

.notification.info { background: rgba(66, 72, 130, 0.7); }
.notification.success { background: rgba(66, 130, 98, 0.7); }
.notification.error { background: rgba(130, 66, 66, 0.7); }

.notification .note-text {
  margin: 0;
  padding: 0;
}

.notification .note-text a {
  color: #fff;
  text-decoration: underline;
  line-height: 1.1; /* keeps link text height tight too */
}

.note-dismiss {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5em;
  cursor: pointer;
  line-height: 1;
  margin-top: -3px;
  padding: 15px 15px;
}

.note-dismiss:hover {
  background: none;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}



/* Responsive: Collapse Sidebar */
@media (max-width: 768px) {
    .layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 10px 15px;
    }

    .sidebar h1 {
        font-size: 1.2rem;
        margin: 0;
    }

    .sidebar nav {
        flex-direction: row;
        gap: 15px;
        flex-grow: unset;
    }

    .sidebar nav a {
        padding: 5px 10px;
    }

    .sidebar footer {
        display: none;
    }
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
    padding: 0;
}

.image-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 12px;
    width: 100%;
    height: 100%;
	border-radius: 4px;
}

.image-wrapper {
    flex-grow: 1;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    position: relative;
    background: #eee;
	border: 0;
	border-radius: 4px;
}

.image-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 20%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.20), transparent);
    pointer-events: none;
    z-index: 2;
}

.image-wrapper img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.img-copy {
    position: absolute;
    top: 2px;
    right: 2px;
    color: white;
    font-size: 1.85em;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    transition: background 0.2s ease;
}

.copied-popup {
    position: absolute;
    top: 0px;
    right: 0px;
	width: 100%;
    background: rgba(0,130,80,0.7);
    color: #fff;
    padding: 10px 8px;
    border-radius: 3px;
    font-size: 1em;
	font-weight: bold;
    white-space: nowrap;
    opacity: 0;
	text-transform: uppercase;
    transform: translateX(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    z-index: 3;
}

.drop-image {
	max-width: 400px;
	min-width: 100px;
	width: 40%;
	opacity: 0.3;
}

.image-wrapper.show-popup .copied-popup {
    opacity: 1;
    transform: translateX(0);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.select-album .album-select-wrapper {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
}

.select-album .album-select-wrapper img.header-img {
	width: 22px;
	height: 22px;
	object-fit: contain;
	flex-shrink: 0;
}

.select-album .album-select-wrapper select {
	flex: 1;
	width: 100%;
	padding: 6px 8px;
	font-size: 14px;
	border: 1px solid #ccc;
	border-radius: 4px;
	background-color: #fff;
	box-sizing: border-box;
}

/* --- new album inline layout --- */
.select-new-album .new-album-wrapper {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 3px;
	width: 100%;
}

.select-new-album .new-album-wrapper img.header-img {
	width: 20px;
	height: 20px;
	object-fit: contain;
	flex-shrink: 0;
	display: block;
}

.select-new-album .new-album-wrapper label {
	font-size: 14px;
	color: #333;
	flex-shrink: 0;
	line-height: 1;
	margin-top: 10px;
}

.select-new-album .new-album-wrapper input[type="text"] {
	flex: 1;
	padding: 6px 8px;
	font-size: 14px;
	border: 1px solid #ccc;
	border-radius: 4px;
	box-sizing: border-box;
}


/* Album Grid (default view of all albums) */
.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
    padding: 10px 0;
}

.album-card {
    display: flex;
    flex-direction: column;
	align-items: space-between;
    justify-content: flex-start;
    font-size: 12px;
    width: 100%;
    height: 100%;
    border-radius: 4px;
	background: rgba(0,0,0,0.10);
}

.album-card img,
.empty-thumb {
    flex-grow: 1;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
	background: transparent;
    border: 1px solid rgba(0,0,0,0.10);
    border-radius: 4px;
}

.album-title {
	font-weight: bold;
	margin: 5px;
	font-size: 14px;
	text-align: center;
	color: #333;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.empty-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 12px;
    font-style: italic;
    background: repeating-linear-gradient(
        45deg,
        #f5f5f5,
        #f5f5f5 10px,
        #e0e0e0 10px,
        #e0e0e0 20px
    );
	opacity: 0.5;
}

/* Album view image grid */
.album-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
    padding: 10px 0;
}

.album-image-grid img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    border: 1px solid rgba(0, 0, 0, 0.4);
    border-radius: 4px;
}

/* Form */


form input[type="text"],
form input[type="email"],
form input[type="password"] {
	background: #f9f9f9;
    width: 90%;
    max-width: 400px;
    padding: 8px;
    margin: 6px auto;
    display: block;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: "Nunito Sans", sans-serif;
}

form select {
  background: #f9f9f9;
  width: 90%;
  max-width: 400px;
  padding: 8px;
  margin: 6px auto;
  display: block;
  border: 1px solid #ccc;
  border-radius: 4px;
  -webkit-appearance: none; 
  -moz-appearance: none;
  appearance: none;
    font-family: "Nunito Sans", sans-serif;
}


form button {
    padding: 10px 20px;
    background-color: #293661;
    color: #fff;
    border: none;
    border-radius: 4px;
    margin-top: 10px;
    cursor: pointer;
	text-transform: uppercase;
	font-weight: bold;
    font-family: "Nunito Sans", sans-serif;
}

form button:hover {
    background-color: #394776;
}


/* Error message styling */
.message {
    background: #ffe0e0;
    color: #b00000;
    border: 1px solid #d99;
    padding: 8px;
    margin-bottom: 10px;
    border-radius: 4px;
    font-size: 14px;
}

.message.success {
    background: #e0ffe0;
    color: #006600;
    border: 1px solid #7fcb7f;
    padding: 8px;
    margin-top: 15px;
    border-radius: 4px;
    font-size: 14px;
}

.message.error {
    background: #ffe0e0;
    color: #b00000;
    border: 1px solid #d99;
    padding: 8px;
    margin-top: 15px;
    border-radius: 4px;
    font-size: 14px;
}

#uploadForm {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.form-section {
    margin-bottom: 20px;
}

#uploadForm label {
    font-weight: bold;
    display: block;
    margin-bottom: 6px;
}

#uploadForm input[type="text"],
#uploadForm select,
#uploadForm input[type="file"] {
    width: 100%;
    max-width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}


.settings-form {
    max-width: 500px;
    margin: 20px 0;
}
.settings-form form {
    margin-bottom: 30px;
    background: #f9f9f9;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
}
.settings-form label {
    display: block;
    margin-top: 10px;
}
.settings-form input {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.settings-form button {
    margin-top: 15px;
    padding: 10px 16px;
    background: #444;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.settings-form button:hover {
    background: #000;
}
.success {
    color: green;
    margin-bottom: 10px;
}
.error {
    color: red;
    margin-bottom: 10px;
}

.theme-toggle {
	display: flex;
	width: 100%;
	align-items: center;
	justify-content: flex-start;
    background: none;
    border: none;
    cursor: pointer;
	color: #ddd;
	margin-bottom: 10px;
}

.theme-toggle img {
    width: 20px;
    height: 20px;
	margin-right: 10px;
}

.settings-form button {
  background: #293661;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: none;
  border-radius: 5px;
  color: #fff;
  font-size: 0.85em;
  font-weight: 600;
  cursor: pointer;
  text-transform: uppercase;
  transition: background 0.2s ease, transform 0.1s ease;
  line-height: 1;              /* ensures equal height */
  min-width: 120px;            /* optional, for symmetry */
}

.settings-form button:hover {
	background: #38447a;
}