body {
    color: #606c76;
}

label:not(.form-check-label) {
    font-weight: 700;
    margin-bottom: .3rem !important;
}

.splash-content {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50vh;
    position: relative;
}

.loader-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.loader {
    width: 75px;
    height: 75px;
    border: 8px solid rgba(100, 100, 100, 0.3);
    border-radius: 50%;
    border-top-color: #eee;
    animation: spin 2s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.telegram-container {
    display: none;
    color: var(--color-cakephp-gray);
    text-align: center;
}

input[type="text"], input[type="select"], input[type="tel"], input[type="file"], textarea, select, input:not([type]) {
    margin-bottom: .3rem;
    -webkit-appearance: none;
    background-color: transparent;
    border: 0.1rem solid #d1d1d1;
    border-radius: .4rem;
    box-shadow: none;
    box-sizing: inherit;
    height: 2.5rem;
    padding: .6rem;
    width: 100%;
}

.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    background-color: var(--color-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.main-content {
    margin-top: 60px;
    padding: 20px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.logo-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-cakephp-gray);
}

.logo-icon {
    width: 36px;
    height: 36px;
    background-color: black;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 0.3rem;
}

.media-item {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: transform 0.3s;
  aspect-ratio: 1/1;
}

.media-item button {
    padding: 0;
    margin: 0;
}

.media-item:hover {
  transform: scale(1.05);
}

.media-item img, .media-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-item .delete-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding-top: 1px;
}

.media-item .reorder-handle {
  position: absolute;
  bottom: 5px;
  left: 5px;
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: move;
  padding-top: 1px;
}

.upload-button-container {
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e9ecef;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
}

.upload-button-container:hover {
  background: #dee2e6;
}

.upload-button-container .plus-icon {
  font-size: 36px;
  color: #6c757d;
}

.media-view-container {
    padding: 0 15px;
    max-width: 100%;
    box-sizing: border-box;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.media-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    aspect-ratio: 1/1;
}

.media-item.loading {
    position: relative;
    border: 2px dashed #ccc;
    min-height: 100px;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

.progress-bar {
    width: 80%;
    height: 8px;
    background: #444;
    border-radius: 4px;
    margin-bottom: 8px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: #31a6ff;
    transition: width 0.3s ease;
}

.media-preview-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.media-preview-container video,
.media-preview-container img {
    max-width: 100%;
    max-height: 200px;
    display: block;
}

.media-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

.video-wrapper {
    position: relative;
    height: 100%;
}

.video-wrapper video {
    pointer-events: none; /* Отключаем события для самого видео */
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: none;
}

.video-icon {
    pointer-events: auto; /* Иконка кликабельна */
    cursor: pointer; /* Добавляем указатель */
    position: relative; /* Важно для z-index */
    z-index: 2; /* Поднимаем над другими элементами */
    font-size: 24px;
    color: white;
    text-shadow: 0 0 5px rgba(0,0,0,0.5);
}

.no-media {
    text-align: center;
    color: #666;
    padding: 20px;
}

/* Новые стили для видео в полноэкранном режиме */
video::-webkit-media-controls {
    display: flex !important;
}

.media-viewer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.media-content {
    width: 100%;
    height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.full-media {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 1001;
    padding: 0;
    margin: 0;
}

.form-control:focus {
  background-color: transparent;
  box-shadow: none;
  border-color: var(--color-cakephp-red); /* Можно оставить подсветку рамки */
}

.btn-warning {
  background-color: var(--color-cakephp-red) !important;
  border-color: var(--color-cakephp-red) !important;
  color: var(--color-cakephp-gray) !important;
}
.btn-warning:hover {
    background-color: #ef8d00 !important;
    border-color: #ef8d00 !important;
    outline: 0;
}

.btn-warning:focus {
    box-shadow: 0 0 0 .25rem rgb(217 123 6 / 50%) !important;
}

.text-warning {
    color: var(--color-cakephp-red) !important;
}