@charset "UTF-8";

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--font-color);
    padding-top: 40px; /* Space for fixed header */
}

.main-container {
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
}

.cropper-container {
    background-color: var(--content-bg-color);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 25px;
}

h1 {
    margin-top: 0;
    color: var(--font-color);
    text-align: center;
    margin-bottom: 10px;
}

/* Tool info banner */
.tool-info-banner {
    display: flex;
    align-items: center;
    background-color: #e8f5e9;
    border-left: 4px solid #4CAF50;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.info-icon {
    font-size: 24px;
    margin-right: 15px;
    color: #4CAF50;
}

.info-content {
    flex: 1;
}

.info-title {
    margin: 0 0 5px 0;
    font-size: 18px;
    color: #2e7d32;
}

.info-description {
    margin: 0;
    color: #333;
    font-size: 15px;
    line-height: 1.4;
}

.info-description strong {
    font-weight: 600;
    color: #1b5e20;
}

/* Image Preview Area */
.image-preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.dropzone {
    width: 95%;
    height: 150px;
    border: 2px dashed #ccc;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s, background-color 0.3s;
    margin-bottom: 10px;
	background-color: var(--alt-content-bg-color);
	color: var(--alt-font-color);
    color: #4CAF50;
}

.dropzone:hover, .dropzone.dragover {
    border-color: #4CAF50;
    background-color: #f0f9f0;
}

.file-input {
    display: none;
}

.file-input-label {
    background-color: #4CAF50;
    color: white;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.file-input-label:hover {
    background-color: #45a049;
}

/* Reset container */
.reset-container {
    text-align: center;
    margin-bottom: 15px;
    width: 100%;
    display: none;
}

.reset-link {
    color: var(--font-color);
    text-decoration: none;
    font-size: 15px;
    cursor: pointer;
    padding: 6px 12px;
    border: 1px dashed #ccc;
    border-radius: 4px;
    display: inline-block;
    transition: all 0.2s;
}

.reset-link:hover {
    color: #4CAF50;
    border-color: #4CAF50;
    background-color: var(--alt-content-bg-color);
}

.reset-link:before {
    content: "↺ ";
    display: inline-block;
    margin-right: 5px;
}

/* Crop Container */
.crop-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    display: none;
}

.crop-wrapper {
    position: relative;
    display: inline-block;
    margin: 0 auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.crop-image {
    display: block;
    max-width: 100%;
    height: auto;
    user-select: none;
    -webkit-user-drag: none;
}

/* Crop Box */
.crop-box {
    position: absolute;
    border: 2px solid #4CAF50;
    background: rgba(76, 175, 80, 0.1);
    cursor: move;
    min-width: 50px;
    min-height: 50px;
}

.crop-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

/* Crop Handles */
.crop-handles {
    position: relative;
    width: 100%;
    height: 100%;
}

.handle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #4CAF50;
    border: 2px solid white;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.handle.nw {
    top: -5px;
    left: -5px;
    cursor: nw-resize;
}

.handle.ne {
    top: -5px;
    right: -5px;
    cursor: ne-resize;
}

.handle.sw {
    bottom: -5px;
    left: -5px;
    cursor: sw-resize;
}

.handle.se {
    bottom: -5px;
    right: -5px;
    cursor: se-resize;
}

.crop-dimensions {
    text-align: center;
    margin-top: 10px;
    font-size: 14px;
    color: var(--font-color);
}

/* Preview Container */
.preview-container {
    margin-top: 20px;
    text-align: center;
    display: none;
}

.preview-container h4 {
    margin-bottom: 10px;
    color: var(--font-color);
}

.preview-canvas {
    border: 1px solid #ddd;
    border-radius: 4px;
    max-width: 200px;
    max-height: 200px;
}

.preview-dimensions {
    margin-top: 5px;
    font-size: 12px;
    color: var(--font-color);
}

/* Cropper Form */
.cropper-form {
    padding: 20px;
    background-color: var(--bg-color);
    border-radius: 6px;
	color: var(--font-color);
}

.crop-controls h3 {
    margin-top: 0;
    margin-bottom: 15px;
	color: var(--font-color);
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.control-group {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.control-group label {
    min-width: 80px;
    margin-right: 10px;
    font-weight: 500;
}

.aspect-select {
    flex: 1;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.position-controls {
    margin-top: 15px;
}

.control-row {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.control-row .control-group {
    flex: 1;
    margin-bottom: 0;
}

/* Buttons */
.action-buttons {
    display: flex;
    justify-content: center;
    margin-top: 25px;
}

.primary-button, .secondary-button {
    padding: 10px 25px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.primary-button {
    background-color: #4CAF50;
    color: white;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 500;
}

.primary-button.ready {
    background-color: #4CAF50;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
    animation: readyPulse 2s infinite;
}

@keyframes readyPulse {
    0% { box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3); }
    50% { box-shadow: 0 4px 16px rgba(76, 175, 80, 0.5); }
    100% { box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3); }
}

.primary-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    box-shadow: none;
    animation: none;
}

.secondary-button {
    background-color: #f1f1f1;
    color: #333;
}

.secondary-button:hover {
    background-color: #e7e7e7;
}

.secondary-button:disabled {
    background-color: #f1f1f1;
    color: #999;
    cursor: not-allowed;
}

.download-icon {
    display: inline-block;
    margin-right: 5px;
    font-size: 14px;
}

/* Success notification */
.crop-notification {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #4CAF50;
    color: white;
    padding: 12px 20px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: opacity 0.5s;
    display: flex;
    align-items: center;
}

.crop-notification span {
    font-size: 18px;
    margin-right: 10px;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .control-row {
        flex-direction: column;
        gap: 5px;
    }
    
    .crop-wrapper {
        max-width: 100%;
    }
}