/**
 * Image Cropper Tool Styles - PicsPanda
 */

/* File Thumbnail styling */
.file-thumbnail {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    background-size: cover;
    background-position: center;
    margin-right: 12px;
    border: 1px solid #eee;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

/* Selected file styling */
.file-item.selected {
    background-color: rgba(74, 108, 247, 0.08);
    border-left: 3px solid var(--primary-color);
}

/* Improved file item styling */
.file-item {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 8px;
    margin-bottom: 10px;
    padding: 12px 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    cursor: pointer;
    border-left: 3px solid transparent;
}

.file-item:hover {
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.file-icon {
    color: var(--primary-color);
    font-size: 20px;
    margin-right: 12px;
    flex-shrink: 0;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 500;
    margin-bottom: 3px;
    color: #333;
    word-break: break-all;
}

.file-meta {
    font-size: 13px;
    color: #6c757d;
}

.file-remove {
    color: #e74c3c;
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s ease;
    background: none;
    border: none;
}

.file-remove:hover {
    background-color: rgba(231, 76, 60, 0.1);
}

/* Cropper container styling */
.cropper-container {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.cropper-container h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
}

.cropper-wrapper {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
    background-color: #000;
    border-radius: 8px;
}

.cropper-preview {
    width: 100%;
    max-height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Crop controls styling */
.crop-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
    padding: 20px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.crop-control-group {
    flex: 1;
    min-width: 200px;
}

.crop-control-group h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
    color: #333;
    position: relative;
    padding-bottom: 8px;
}

.crop-control-group h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    
    border-radius: 3px;
}

.crop-aspect-ratios {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.crop-aspect-ratio {
    padding: 8px 16px;
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #495057;
    text-align: center;
    min-width: 60px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.crop-aspect-ratio:hover {
    background-color: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.crop-aspect-ratio.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 3px 8px rgba(74, 108, 247, 0.3);
}

.crop-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 15px;
}

.crop-action-btn {
    padding: 10px 18px;
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #495057;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.crop-action-btn i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.crop-action-btn:hover {
    background-color: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.crop-action-btn:hover i {
    transform: scale(1.2);
}

.crop-action-btn.primary {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 2px 5px rgba(74, 108, 247, 0.2);
}

.crop-action-btn.primary:hover {
    background-color: #3a5bd9;
    box-shadow: 0 4px 8px rgba(74, 108, 247, 0.3);
}

.crop-action-btn.danger {
    background-color: #fff5f5;
    color: #e74c3c;
    border-color: #ffe3e3;
    box-shadow: 0 2px 5px rgba(231, 76, 60, 0.1);
}

.crop-action-btn.danger:hover {
    background-color: #ffe3e3;
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.2);
}

/* Results styling */
.results-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.result-item {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.result-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.result-thumbnail {
    height: 180px;
    overflow: hidden;
    position: relative;
    background-color: #f8f9fa;
}

.result-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.result-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.result-name {
    font-weight: 500;
    margin-bottom: 5px;
    color: #333;
    word-break: break-all;
    font-size: 14px;
    line-height: 1.4;
}

.result-meta {
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 15px;
}

.result-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.download-btn, .preview-btn {
    flex: 1;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: none;
}

.download-btn {
    background-color: var(--primary-color);
    color: white;
}

.download-btn:hover {
    background-color: #3a5bd9;
    box-shadow: 0 2px 5px rgba(74, 108, 247, 0.3);
}

.preview-btn {
    background-color: #f8f9fa;
    color: #495057;
    border: 1px solid #ced4da;
}

.preview-btn:hover {
    background-color: #e9ecef;
}

/* Cropper.js overrides */
.cropper-view-box {
    outline: 1px solid var(--primary-color);
    outline-color: var(--primary-color);
}

.cropper-line {
    background-color: var(--primary-color);
}

.cropper-point {
    background-color: var(--primary-color);
    width: 8px;
    height: 8px;
}

.cropper-center:before,
.cropper-center:after {
    background-color: var(--primary-color);
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 20px;
    border-radius: 8px;
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #aaa;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    margin-top: 15px;
    text-align: center;
}

.modal-body img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 4px;
}

/* Notification styles */
#notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 300px;
    max-width: 400px;
    animation: slide-in 0.3s ease-out;
}

.notification.info {
    border-left: 4px solid #3498db;
}

.notification.success {
    border-left: 4px solid #2ecc71;
}

.notification.warning {
    border-left: 4px solid #f39c12;
}

.notification.error {
    border-left: 4px solid #e74c3c;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-content i {
    font-size: 18px;
}

.notification-content span {
    font-size: 14px;
}

.notification-close {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 14px;
    padding: 5px;
}

.notification-close:hover {
    color: #333;
}

.notification.fade-out {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.3s, transform 0.3s;
}

@keyframes slide-in {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive styles */
@media (max-width: 992px) {
    .tool-content {
        padding: 20px;
    }
    
    .results-container {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .crop-controls {
        flex-direction: column;
    }
    
    .crop-control-group {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .tool-content {
        padding: 15px;
    }
    
    .upload-area {
        padding: 30px 15px;
    }
    
    .upload-area h3 {
        font-size: 18px;
    }
    
    .upload-area p {
        font-size: 14px;
    }
    
    .results-container {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
    
    .result-item {
        margin-bottom: 15px;
    }
    
    .result-thumbnail {
        height: 150px;
    }
    
    .result-info {
        padding: 12px;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .download-btn, .preview-btn {
        width: 100%;
        padding: 8px;
    }
    
    .crop-actions {
        flex-direction: column;
    }
    
    .crop-action-btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .tool-content {
        padding: 10px;
    }
    
    .upload-area {
        padding: 20px 10px;
    }
    
    .upload-area h3 {
        font-size: 16px;
    }
    
    .upload-area p {
        font-size: 13px;
    }
    
    .upload-btn {
        padding: 8px 15px;
    }
    
    .file-item {
        padding: 10px;
    }
    
    .file-thumbnail {
        width: 40px;
        height: 40px;
    }
    
    .file-info {
        max-width: 60%;
    }
    
    .results-container {
        grid-template-columns: 1fr;
    }
    
    .result-item {
        margin-bottom: 15px;
    }
    
    .result-thumbnail {
        height: 180px;
    }
    
    .result-name {
        font-size: 14px;
    }
    
    .result-meta {
        font-size: 12px;
    }
    
    .crop-aspect-ratios {
        flex-wrap: wrap;
    }
    
    .crop-aspect-ratio {
        font-size: 12px;
        padding: 5px 10px;
    }
} 