/*!
 * Quote Creator JS Styles
 * (c) 2025 Siddharth Kumar
 * MIT License
 * https://github.com/siddharthvishwamitra
 */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@100..900&display=swap');

@font-face {
  font-family: 'IGSans-R';
  src: url('/assets/font/InstagramSans-Regular.ttf') format('truetype');
}

* {
  font-family: "Geist", sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: #f4f4f4;
  padding: 0;
}

a {
  text-decoration: none;
  color: #ffffff;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #222;
  color: #fff;
  padding: 15px 20px;
}

h1 {
  font-size: 22px;
  margin: 0;
}

header .link {
  text-decoration: none;
  color: #ffffff;
  font-weight: 700;
}

.apex-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.container {
  width: 100%;
  max-width: 900px;
  text-align: center;
}

.image-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
}

.image-options img {
  width: 100px;
  height: 100px;
  margin: 10px;
  cursor: pointer;
  border-radius: 5px;
  transition: transform 0.2s;
  object-fit: cover;
}

.image-options img:hover {
  transform: scale(1.1);
}

/* Recent Images Section */
#recentImages {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
}

.image-item {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 5px;
  overflow: hidden;
  display: inline-block;
}

.image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

.delete-icon {
  position: absolute;
  top: 5px;
  right: 5px;
  background: red;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  text-align: center;
  cursor: pointer;
  font-size: 14px;
  line-height: 20px;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Editor Section */
.editor {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  width: 100%;
}

textarea {
  width: 100%;
  height: 100px;
  resize: none;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 16px;
  outline: none;
}

canvas {
  max-width: 100%;
  border-radius: 10px;
}

/* Controls */
.controls {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  width: 100%;
  padding: 5px;
}

.controls label {
  font-size: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  padding: 8px;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

select, input {
  padding: 6px;
  font-size: 14px;
  width: 100%;
  text-align: center;
  border-radius: 5px;
  border: 1px solid #ddd;
  outline: none;
}

button {
  padding: 10px;
  border: none;
  background: #272727;
  color: white;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  width: 100%;
  transition: background 0.2s;
}

button:hover {
  background: #0056b3;
}

.button-group {
  display: flex;
  gap: 10px;
  justify-content: center;
  width: 100%;
}

/* Cropper Container */
#cropContainer {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 10px;
  border-radius: 5px;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 999;
}

#cropBox img {
  max-width: 100%;
  display: block;
  margin: 0 auto;
}

#cropBox .button-row {
  display: flex;
  gap: 10px;
}

#cropBox .button-row button {
  flex: 1;
  margin: 5px 0;
  text-align: center;
}

#cropBox .button-row button:hover {
  background: #0056b3;
}

/* Mobile Styles */
@media (max-width: 768px) {
  .controls {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  .image-options img {
    width: 80px;
    height: 80px;
  }

  .image-item {
    width: 100px;
    height: 100px;
  }

  .delete-icon {
    width: 18px;
    height: 18px;
    font-size: 12px;
    line-height: 18px;
  }
}

.recent-img-title {
  background-color: #272727;
  text-align: left;
  color: #ffffff;
  padding: 10px;
  border-radius: 5px;
  display: none;
}

.premade-img-title {
background-color: #272727;
text-align: left;
color: #ffffff;
padding: 10px;
border-radius: 5px;
margin-top: 20px;
}

input[type="file"] {
  display: none;
}
.custom-file-upload {
  border: 1px solid #ccc;
  display: inline-block;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 5px;
}

.custom-file-upload:hover {
  background: #e8e8e8;
}

.no-js-message {
  background: #ffdddd;
  color: #900;
  padding: 1em;
  text-align: center;
  font-weight: bold;
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  background: #ddd;
  border-radius: 4px;
  outline: none;
  margin-top: 10px;
}

/* Track (background) */
input[type="range"]::-webkit-slider-runnable-track {
  background: #4caf50;
  height: 8px;
  border-radius: 4px;
}

input[type="range"]::-moz-range-track {
  background: #4caf50;
  height: 8px;
  border-radius: 4px;
}

/* Thumb (the handle) */
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  background: #2196f3;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  margin-top: -6px;
}

input[type="range"]::-moz-range-thumb {
  background: #2196f3;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
}
