/* CSS Shapes Generator Styles */

/* Shape Library */
.shape-library {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
    padding: 20px;
    border-radius: 12px;
    background-color: #f8f9fa;
    border: 1px dashed #dee2e6;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.05);
}

.shape-card {
    width: 120px;
    height: 150px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s;
    cursor: pointer;
    background-color: white;
    position: relative;
    z-index: 1;
}

.shape-card:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    background-color: #f9f9f9;
}

.shape-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: -1;
    transition: opacity 0.3s;
    opacity: 0;
}

.shape-card:hover:before {
    opacity: 1;
}

.shape-preview {
    height: 100px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
}

.shape-info {
    padding: 10px;
    text-align: center;
    font-size: 14px;
}

/* Shape Editor */
.shape-preview-container {
    position: relative;
    width: 100%;
    height: 300px;
    border-radius: 8px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    margin-bottom: 20px;
}

#shape-preview {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shape-element {
    /*width: 80%;*/
    /*height: 80%;*/
    width: 300px;
    height: 300px;
    background-color: #4287f5;
}

.clip-path-editor {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.control-point {
    position: absolute;
    width: 12px;
    height: 12px;
    background-color: white;
    border: 2px solid #4287f5;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: move;
    pointer-events: auto;
}

/* Shape Controls */
.shape-controls {
    padding: 15px;
    border-radius: 8px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
}

.shape-specific-controls {
    margin-bottom: 20px;
}

.color-picker {
    width: 60px;
    height: 40px;
    padding: 0;
    border: none;
    cursor: pointer;
}

/* Code Container */
.code-container {
    position: relative;
    margin-top: 15px;
}

.code-container pre {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    max-height: 300px;
    overflow-y: auto;
}

.code-container code {
    font-family: monospace;
    white-space: pre-wrap;
}

.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

/* Example Shapes */
.example-container {
    display: flex;
    margin-bottom: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #dee2e6;
}

.example-shape {
    width: 150px;
    height: 150px;
    background-color: #4287f5;
    margin: 15px;
}

.example-code {
    flex-grow: 1;
    padding: 15px;
    display: flex;
    align-items: center;
}

.example-code pre {
    margin: 0;
    background-color: #f1f3f5;
    padding: 10px;
    border-radius: 5px;
    width: 100%;
}

.example-circle {
    clip-path: circle(50% at 50% 50%);
}

.example-circle-small {
    clip-path: circle(40% at 50% 50%);
}

.example-ellipse {
    clip-path: ellipse(40% 25% at 50% 50%);
}

.example-polygon {
    clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
}

.example-inset {
    clip-path: inset(10% 20% 10% 20% round 10px);
}

/* Shape Modal Styles */
.shape-modal-preview {
    transition: transform 0.3s ease;
    overflow: hidden;
}

.shape-modal-preview:hover {
    transform: scale(1.05);
}

.modal-content {
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    overflow: hidden;
}

.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #eaeaea;
}

.modal-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #eaeaea;
}

#use-shape-btn {
    background-color: #4287f5;
    border-color: #4287f5;
    transition: all 0.3s ease;
}

#use-shape-btn:hover {
    background-color: #2d6fd9;
    border-color: #2d6fd9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(45, 111, 217, 0.2);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    z-index: 1000;
    border: none;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .shape-library {
        justify-content: center;
    }

    .shape-card {
        width: 100px;
        height: 130px;
    }

    .shape-preview {
        height: 80px;
    }

    .example-container {
        flex-direction: column;
    }

    .example-shape {
        width: calc(100% - 30px);
        height: 100px;
    }
}
