.container {
    margin: 0;
    padding: 20px;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.toolbar {
    position: sticky;
    top: 0;
    background: white;
    padding: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.toolbar button {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    background: #007bff;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
}

.toolbar button:hover {
    background: #0056b3;
}

.toolbar input[type="file"] {
    padding: 5px;
}

.workspace {
    flex: 1;
    overflow: auto;
    padding: 20px;
    background: #f0f0f0;
}

.a4-page {
    width: 210mm;
    height: 297mm;
    background: white;
    position: relative;
    margin: 0 auto;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

#background-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#background-layer img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#text-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.text-element {
    position: absolute;
    min-width: 100px;
    min-height: 20px;
    padding: 5px 10px;
    cursor: move;
    background: rgba(255,255,255,0.7);
    border: 1px dashed #ccc;
    user-select: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
    font-family: 'Open Sans', sans-serif;
}

/* Düzenleme modundaki metin kutusu */
.text-element.editing {
    cursor: text;
    white-space: pre-wrap;
    overflow: auto;
    outline: none;
    border: 2px solid #007bff;
    background: rgba(255,255,255,0.9);
    min-height: 1em;
    height: auto;
}

/* Düzenleme modunda olmayan metin kutusu */
.text-element:not(.editing) {
    white-space: pre-wrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Boyutlandırma tutamaçları için stiller */
.text-element .ui-resizable-handle {
    background-color: transparent;
    border-radius: 2px;
}

.text-element.selected .ui-resizable-handle {
    background-color: #007bff;
}

/* Köşe tutamaçları için özel stil */
.text-element .ui-resizable-se,
.text-element .ui-resizable-sw,
.text-element .ui-resizable-ne,
.text-element .ui-resizable-nw {
    width: 8px;
    height: 8px;
    background-color: #fff;
    border: 2px solid #007bff;
    border-radius: 50%;
}

/* Seçili durumdaki metin kutusu için tutamaçları görünür yap */
.text-element.selected .ui-resizable-handle {
    background-color: #007bff;
    border-radius: 2px;
}

/* Boyutlandırma sırasında kutunun görünümü */
.text-element.ui-resizable-resizing {
    opacity: 0.8;
}

.text-element:focus {
    outline: none;
    border-color: #007bff;
    background: rgba(255,255,255,0.9);
    white-space: normal;
    min-width: 100px;
    width: auto;
}

.text-controls {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-left: 10px;
}

.text-controls select,
.text-controls input[type="color"] {
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.text-element.selected {
    border: 2px solid #007bff;
}

#positionIndicator {
    font-family: monospace;
    font-size: 12px;
    pointer-events: none;
}

#sizeIndicator {
    font-family: monospace;
    font-size: 12px;
    pointer-events: none;
}

/* Silme butonu için farklı renk */
#deleteText {
    background: #dc3545;
}

#deleteText:hover {
    background: #c82333;
}

/* Tasarım yükleme butonu için stil */
#loadDesign {
    display: none;
}

/* Başarı mesajı için animasyon */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.success-message {
    animation: slideIn 0.3s ease-out;
}

/* Font stil butonları için stiller */
.font-style-buttons {
    display: inline-flex;
    gap: 5px;
}

.style-btn {
    width: 30px !important;
    height: 30px !important;
    padding: 0 !important;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa !important;
    color: #212529 !important;
    border: 1px solid #dee2e6 !important;
}

.style-btn:hover {
    background: #e9ecef !important;
}

.style-btn.active {
    background: #007bff !important;
    color: white !important;
    border-color: #0056b3 !important;
}

/* İtalik buton için özel stil */
#italicText {
    font-style: italic;
}

/* Altı çizili buton için özel stil */
#underlineText {
    text-decoration: underline;
}

/* Genel font ayarı */
body {
    font-family: 'Open Sans', sans-serif;
}

.text-element {
    position: absolute;
    min-width: 100px;
    min-height: 20px;
    padding: 5px 10px;
    cursor: move;
    background: rgba(255,255,255,0.7);
    border: 1px dashed #ccc;
    user-select: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
    font-family: 'Open Sans', sans-serif; /* Varsayılan font */
}

.image-element {
    position: absolute;
    min-width: 50px;
    min-height: 50px;
    border: 1px dashed #ccc;
    background-color: transparent;
    box-sizing: border-box;
}

.image-element.selected {
    border: 2px solid #007bff;
}

.image-element img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

.image-element .ui-resizable-handle {
    background-color: #007bff;
    border-radius: 2px;
    opacity: 0;
}

.image-element.selected .ui-resizable-handle {
    opacity: 1;
} 