/* Instagram modals CSS */

/* Modal Styles */
.modal-content {
    background-color: #f8f0f7;
    border-radius: 12px;
    border: none;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-bottom: 1px solid #e9d6e3;
    background-color: #f8f0f7;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    text-align: center;
    position: relative;
}

.modal-header .modal-title {
    color: #333;
    font-weight: 600;
    width: 100%;
    text-align: center;
}

.modal-header .btn-close {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #eb6595;
    opacity: 1;
    padding: 0.5rem;
    color: white;
    border-radius: 50%;
}

/* Gradient Button */
.gradient-button {
    background: linear-gradient(45deg, #f5af19, #f12711);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 10px 15px;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.gradient-button:hover {
    background: linear-gradient(45deg, #f12711, #f5af19);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(241, 39, 17, 0.3);
}

/* Photo selection layout */
.photo-selection-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

/* Horizontal scrolling photos */
.photos-scroll-container {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding: 10px 5px;
    margin-bottom: 20px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #e9d6e3 #f8f0f7;
}

.photos-scroll-container::-webkit-scrollbar {
    height: 8px;
}

.photos-scroll-container::-webkit-scrollbar-track {
    background: #f8f0f7;
    border-radius: 10px;
}

.photos-scroll-container::-webkit-scrollbar-thumb {
    background-color: #e9d6e3;
    border-radius: 10px;
}

/* Yatay kaydırma için gerekli CSS */
.photo-scroll-container {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    gap: 5px; /* yarıya indirme */
    padding: 5px 3px; /* yarıya indirme */
    margin-bottom: 8px; /* yarıya indirme */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scroll-behavior: smooth;
    max-width: 100%;
    position: relative;
}

.photo-scroll-container::-webkit-scrollbar {
    height: 8px;
}

.photo-scroll-container::-webkit-scrollbar-track {
    background: #f8f0f7;
    border-radius: 10px;
}

.photo-scroll-container::-webkit-scrollbar-thumb {
    background-color: #e9d6e3;
    border-radius: 10px;
}

/* Comments List Scroll Styles */
#comments-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e9d6e3;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 15px;
    scrollbar-width: thin;
    scrollbar-color: #8a4fff #f8f0f7;
}

#comments-list::-webkit-scrollbar {
    width: 8px;
}

#comments-list::-webkit-scrollbar-track {
    background: #f8f0f7;
    border-radius: 10px;
}

#comments-list::-webkit-scrollbar-thumb {
    background-color: #8a4fff;
    border-radius: 10px;
    border: 2px solid #f8f0f7;
}

.photo-scroll-container.active {
    cursor: grabbing;
}

.photo-scroll-item {
    position: relative;
    flex: 0 0 auto;
    width: 91px; /* %40 büyütme (65px'in %140'ı) */
    height: 91px; /* %40 büyütme (65px'in %140'ı) */
    border-radius: 6px; /* %40 büyütme */
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Gölgeyi de büyüt */
    cursor: grab;
    transition: transform 0.2s;
    border: 3px solid #ddd; /* Kenar kalınlığını da artır */
}

/* Yorumları tamamlanmış fotoğraflar için yeşil kenarlk */
.photo-comment-complete {
    border: 2px solid #28a745 !important; /* 3px'ten 2px'e küçültme */
}

/* Yorumları tamamlanmamış fotoğraflar için kırmızı kenarlk */
.photo-comment-incomplete {
    border: 2px solid #dc3545 !important; /* 3px'ten 2px'e küçültme */
}

.photo-scroll-item:active {
    cursor: grabbing;
}

.photo-scroll-item.selected {
    border: 2px solid #8a4fff; /* 3px'ten 2px'e küçültme */
    transform: scale(1.05); /* Biraz daha belirgin olması için değeri artırdım */
}

.photo-scroll-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-selection-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.photo-selection-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.photo-selection-checkbox {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 10;
    height: 20px;
    width: 20px;
}

.photo-selection-checkbox input[type="checkbox"] {
    opacity: 0;
    position: absolute;
}

.photo-selection-checkbox .checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-selection-checkbox input[type="checkbox"]:checked ~ .checkmark {
    background-color: #3897f0;
}

.photo-selection-checkbox .checkmark:after {
    content: "";
    display: none;
}

.photo-selection-checkbox input[type="checkbox"]:checked ~ .checkmark:after {
    display: block;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

/* Common badge style for all modals */
.photo-play-count,
.photo-comments-count,
.video-play-count,
.photo-likes-count,
.likes-photo-likes-count {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    background-color: transparent;
    color: white;
    font-weight: bold;
    z-index: 998;
    display: flex;
    align-items: center;
    font-size: 12px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

.photo-likes-count i,
.photo-play-count i,
.video-play-count i,
.photo-comments-count i {
    margin-right: 4px;
    color: #fff;
}

/* Icon specific colors */
.photo-likes-count i.fa-heart {
    color: #ff4d4d;
}

.video-play-count i.fa-play,
.photo-play-count i.fa-play {
    color: #3897f0; /* Instagram mavi rengi */
}

.photo-comments-count i.fa-comment {
    color: #fff;
}

/* Increase icon size and add margin */
.photo-likes-count i,
.photo-play-count i,
.video-play-count i,
.photo-comments-count i {
    margin-right: 6px;
    font-size: 12px;
}

/* Badge styles */
.likes-per-photo-badge,
.comments-per-photo-badge,
.views-per-video-badge {
    display: none;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s, visibility 0.2s;
}

/* Show class for badges */
.likes-per-photo-badge.show,
.comments-per-photo-badge.show,
.views-per-video-badge.show {
    display: flex;
    visibility: visible;
    opacity: 1;
}

/* Photo and video container styles */
.photo-container,
.video-container,
.likes-photo-container,
.comments-photo-container {
    position: relative;
    width: 88px;
    height: 95px;
    margin-bottom: 15px;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}

.photo-container:hover,
.likes-photo-container:hover,
.comments-photo-container:hover,
.video-container:hover {
    transform: scale(1.03);
}

.photo-container img,
.likes-photo-container img,
.comments-photo-container img,
.video-container img {
    width: 88px;
    height: 95px;
    object-fit: cover;
    border-radius: 8px;
}

/* Common styles for checkboxes */
.photo-checkbox,
.likes-photo-checkbox,
.comments-photo-checkbox {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Common styles for labels */
.photo-container label,
.likes-photo-container label,
.comments-photo-container label {
    position: absolute;
    top: 10px;
    left: 10px;
    height: 20px;
    width: 20px;
    background-color: rgba(255, 255, 255, 0.7);
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
}

.photo-container label:after,
.likes-photo-container label:after,
.comments-photo-container label:after {
    content: '';
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 11px;
    border: solid #8400ff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Checked styles */
.photo-checkbox:checked ~ label,
.likes-photo-checkbox:checked ~ label,
.comments-photo-checkbox:checked ~ label {
    background-color: #fff;
}

.photo-checkbox:checked ~ label:after,
.likes-photo-checkbox:checked ~ label:after,
.comments-photo-checkbox:checked ~ label:after {
    display: block;
}

/* Selected container styles */
.photo-container.selected img,
.likes-photo-container.selected img,
.comments-photo-container.selected img {
    border: 3px solid #8400ff;
    border-radius: 8px;
}

.photo-container.selected label,
.likes-photo-container.selected label,
.comments-photo-container.selected label {
    border-color: #8400ff;
    background-color: #8400ff;
}

.photo-container.selected label:after,
.likes-photo-container.selected label:after,
.comments-photo-container.selected label:after {
    display: block;
    border-color: white;
}

/* Badge styles for photo/video selection */
.likes-per-photo-badge,
.views-per-video-badge,
.comments-per-photo-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(132, 0, 255, 0.8);
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    z-index: 5;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.likes-per-photo-badge i,
.views-per-video-badge i,
.comments-per-photo-badge i {
    margin-right: 2px;
    font-size: 10px;
}

/* Video selection specific styles */
.video-container {
    position: relative;
    margin-bottom: 10px;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
}

/* GİZLENECEK CHECKBOX VE LABEL TANIMLARI */
.video-checkbox,
.likes-photo-checkbox,
.comments-photo-checkbox,
.video-container label[for^="video"],
.photo-container label[for^="likes-photo"],
.comments-photo-container label[for^="comments-photo"] {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

.video-container img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.video-container:hover img {
    transform: scale(1.03);
}

.video-checkbox {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.video-container label {
    position: absolute;
    top: 10px;
    left: 10px;
    height: 20px;
    width: 20px;
    background-color: rgba(255, 255, 255, 0.7);
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
}

.video-container label:after {
    content: '';
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 11px;
    border: solid #8400ff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.video-checkbox:checked ~ label {
    background-color: #8400ff;
}

.video-checkbox:checked ~ label:after {
    display: block;
    border-color: white;
}

.video-container.selected img {
    border: 3px solid #8400ff;
    border-radius: 8px;
}

.video-container.selected label {
    border-color: #8400ff;
    background-color: #8400ff;
}

.video-container.selected label:after {
    display: block;
    border-color: white;
}

/* Cart preview styles */
.selected-photos-preview,
.selected-videos-preview {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}

.preview-container {
    position: relative;
    margin: 5px;
}

.preview-circle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #8400ff;
}

.preview-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.likes-count {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0,0,0,0.5);
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
}
