/* Unique styles for Passport Photo Editor to avoid conflicts */

.ppe-app-container {
    font-family: 'Arial', sans-serif;
    width: 1080px; /* Changed to fixed width */
    margin: 30px auto;
    padding: 25px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    background-color: #ffffff;
    border-radius: 10px;
    display: flex;
    flex-direction: column; /* Changed to column for top upload */
    align-items: center;
    gap: 20px;
}

.ppe-app-title {
    color: #2c3e50;
    font-size: 2em;
    margin-bottom: 15px;
    font-weight: 600;
    text-align: center;
    width: 100%;
}

/* New style for upload section to be full width at top */
.ppe-upload-section {
    width: 100%; /* Full width */
    padding: 15px;
    border: 2px dashed #28a745; /* Dashed green border */
    border-radius: 8px;
    background-color: #f0fff0; /* Light green background */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px; /* Space between upload and main content */
}


.ppe-input-group {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.ppe-label {
    font-weight: 600;
    color: #555;
    font-size: 1.1em;
}

.ppe-file-input {
    width: 100%; /* Make input take full width of its container */
    max-width: 500px; /* Max width for aesthetics */
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    cursor: pointer;
    text-align: center; /* Center the file input text */
}

.ppe-file-input::file-selector-button {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    background-color: #007bff;
    color: white;
    cursor: pointer;
    margin-right: 15px;
    transition: background-color 0.2s ease;
}

.ppe-file-input::file-selector-button:hover {
    background-color: #0056b3;
}

/* Main content area containing preview and controls */
.ppe-main-content {
    display: flex;
    width: 100%; /* Takes full width of app container */
    justify-content: space-between; /* Pushes items to ends */
    gap: 20px; /* Space between preview and controls */
}

.ppe-preview-container {
    width: calc(1080px - 25px * 2 - 200px - 20px); /* Total width - padding - control panel width - gap */
    height: 600px; /* Adjusted height for larger preview */
    border: 1px dashed #cccccc;
    background-color: #e9ecef;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
    position: relative; /* Needed for brush cursor */
    cursor: none; /* Hide default cursor */
}

.ppe-preview-canvas {
    max-width: 100%;
    max-height: 100%;
    display: block;
    object-fit: contain;
    /* cursor: crosshair; Removed as custom cursor will be used */
}

/* Custom brush cursor */
.ppe-brush-cursor {
    position: absolute;
    border: 2px solid #007bff;
    border-radius: 50%;
    pointer-events: none; /* Allows clicks to pass through */
    transform: translate(-50%, -50%); /* Center the circle on the cursor */
    display: none; /* Hidden by default, shown when drawing */
    z-index: 1000; /* Above canvas */
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.7);
}


.ppe-controls-panel {
    width: 200px; /* Fixed width for control panel */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background-color: #f1f8f9;
    border-radius: 8px;
    box-shadow: inset 0 1px 5px rgba(0,0,0,0.03);
    flex-shrink: 0; /* Prevent shrinking */
}

.ppe-section-title {
    color: #34495e;
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 10px;
    text-align: center;
    width: 100%;
}

.ppe-color-options {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    justify-content: center; /* Center color boxes */
    width: 100%;
}

.ppe-color-box {
    width: 45px; /* Slightly smaller for compact panel */
    height: 45px;
    border-radius: 8px;
    border: 2px solid #ddd;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ppe-color-box:hover {
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

.ppe-color-box.ppe-selected-color {
    border-color: #007bff;
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.7);
    transform: scale(1.05);
}

/* Specific colors */
.ppe-color-white { background-color: #FFFFFF; }
.ppe-color-sky-blue { background-color: #EDFAFF; }
.ppe-color-dark-blue { background-color: #90E0FF; }
/* নতুন কালার বক্সের স্টাইল */
.ppe-color-red { background-color: #2ED1E4; }
.ppe-color-green { background-color: #3A92FF; }
.ppe-color-yellow { background-color: #00B7FF; }




.ppe-brush-tools {
    display: flex;
    flex-direction: column; /* Stack tools vertically in panel */
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #e9f5f7;
    width: 100%;
}

.ppe-tool-btn {
    padding: 8px 15px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.95em;
    transition: background-color 0.3s ease;
    width: 90%; /* Make buttons fill width of brush tools section */
}

.ppe-tool-btn:hover {
    background-color: #5a6268;
}

.ppe-tool-btn.ppe-active-tool {
    background-color: #007bff;
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.7);
}

.ppe-label-small {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px; /* Space above brush size slider */
}

#ppe-brush-size {
    width: 90%; /* Make slider fill width */
    cursor: pointer;
}


.ppe-primary-btn {
    padding: 12px 25px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.1s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    width: 90%; /* Make download button fill width */
}

.ppe-primary-btn:hover {
    background-color: #218838;
    transform: translateY(-1px);
}

/* Updated Status Message Styling */
.ppe-status-message {
    position: sticky;
    top: 90px; /* Adjusted to be near top based on your spec */
    left: 50%;
    transform: translateX(-50%);
    margin: 0 auto;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 500;
    text-align: center;
    width: 100%;
    max-width: 600px; /* Increased max-width for better readability */
    display: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    background-color: #fff;
    border: 1px solid #ddd;
    z-index: 1000; /* Ensure it's above other elements */
}

.ppe-status-message.ppe-info {
    background-color: #e0f7fa;
    color: #00838f;
    border: 1px solid #00acc1;
}

.ppe-status-message.ppe-success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #43a047;
}

.ppe-status-message.ppe-error {
    background-color: #ffebee;
    color: #d32f2f;
    border: 1px solid #f5c6cb;
}

/* Responsive Adjustments (Keeping existing for smaller screens) */
@media (max-width: 1100px) { /* Adjust breakpoint for new fixed width */
    .ppe-app-container {
        width: 95%; /* Make it fluid on smaller screens */
        max-width: 1080px;
        margin: 15px auto;
        padding: 15px;
        gap: 15px;
    }
    .ppe-main-content {
        flex-direction: column; /* Stack content vertically on smaller screens */
        align-items: center;
    }
    .ppe-preview-container {
        width: 100%;
        max-width: 400px; /* Limit preview size on small screens */
        height: 400px;
    }
    .ppe-controls-panel {
        width: 100%;
        max-width: 300px; /* Limit control panel size on small screens */
    }
    .ppe-app-title {
        font-size: 1.5em;
    }
    .ppe-color-options, .ppe-brush-tools {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    .ppe-color-box {
        width: 40px;
        height: 40px;
    }
    .ppe-tool-btn, .ppe-primary-btn {
        width: 100%;
        font-size: 1em;
        padding: 10px;
    }
}