:root {
    --color-primary: #bfa461;
    --color-primary-dark: #a58e52;
    --color-primary-light: #d8c58a;
    --color-secondary: #1a1a1a;
    --color-secondary-light: #333333;
    --color-text: #ffffff;
    --color-text-light: #666666;
    --color-bg: #ffffff;
    --color-border: #e0e0e0;
    --color-bg-light: #f8f8f8;
    --color-success: #2ecc71;
    --color-error: #e74c3c;
    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
}

/* Main Designer Container */
#amirence-designer {
    background: transparent;
    /* border-radius: var(--radius-lg); */
    box-shadow: var(--shadow-lg);
    padding: 25px;
    margin: 30px 0;
    border: 1px solid var(--color-border);
}

#amirence-designer h3 {
    font-size: 1.5rem;
    color: var(--color-primary-dark);
    margin: 0 0 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--color-primary-light);
    font-weight: 600;
}

/* Designer Toolbar */
.designer-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 0px;
    margin-bottom: 20px;
    align-items: center;
}

/* Buttons */
.designer-toolbar button,
#download-preview,
#remove-all {
    background: var(--color-primary);
    color: var(--color-secondary);
    border: none;
    padding: 10px 18px;
    /* border-radius: var(--radius-sm); */
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.designer-toolbar button:hover,
#download-preview:hover,
#remove-all:hover {
    background: var(--color-primary-dark);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.designer-toolbar button:active,
#download-preview:active,
#remove-all:active {
    transform: translateY(0);
}

/* Active View Button */
.designer-toolbar button.view-switch[data-view="front"].active,
.designer-toolbar button.view-switch[data-view="back"].active {
    background: var(--color-secondary);
    color: white;
}

/* Form Elements */
.designer-toolbar label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: var(--color-text);
    font-weight: 500;
    width: 50%;
}

.designer-toolbar input[type="color"] {
    width: 40px;
    height: 40px;
    border: 2px solid var(--color-border);
    /* border-radius: var(--radius-sm); */
    cursor: pointer;
    padding: 2px;
    background: transparent;
}

.designer-toolbar input[type="number"] {
    width: 60px;
    padding: 8px 10px;
    border: 1px solid var(--color-border);
    /* border-radius: var(--radius-sm); */
    font-size: 0.9rem;
    color: var(--color-text);
    background: transparent;
}

.designer-toolbar select {
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    /* border-radius: var(--radius-sm); */
    font-size: 0.9rem;
    background: transparent;
    min-width: 150px;
    color: var(--color-text);
}

.designer-toolbar select option {
    color: #000000;
}


/* Canvas Area */
#shirt-canvas {
    border: 1px solid var(--color-border);
    /* border-radius: var(--radius-md); */
    margin: 0 auto 20px;
    display: block;
    background: var(--color-bg-light);
    box-shadow: var(--shadow-md);
}

/* File Upload */
#logo-upload {
    display: none;
}

.upload-label {
    display: flex;
    background: var(--color-primary);
    color: var(--color-secondary);
    padding: 5px 18px;
    /* border-radius: var(--radius-sm); */
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    margin-right: 10px;
    margin-bottom: 0px !important;
    box-shadow: var(--shadow-sm);
    width: 100%;
    justify-content: center;
    align-items: center;
    height: 35px;
}

.upload-label:hover {
    background: var(--color-primary-dark);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Text Input */
#text-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--color-border);
    /* border-radius: var(--radius-md); */
    font-size: 1rem;
    margin: 0px 0px;
    box-sizing: border-box;
    transition: var(--transition);
    color: var(--color-text);
    background: transparent;
}

#text-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(191, 164, 97, 0.2);
}

/* Action Buttons Container */
.designer-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

/* Remove All Button */
#remove-all {
    background: var(--color-error);
    color: white;
}

#remove-all:hover {
    background: #c0392b;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .designer-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .designer-toolbar label {
        width: 100%;
        justify-content: space-between;
    }

    #shirt-canvas {
        width: 100%;
        height: auto;
    }

    .designer-actions {
        flex-direction: column;
    }
}

/* Animation for canvas updates */
@keyframes fadeIn {
    from {
        opacity: 0.8;
    }

    to {
        opacity: 1;
    }
}

#shirt-canvas {
    animation: fadeIn 0.3s ease-in-out;
}

/* Tooltip for buttons */
[data-tooltip] {
    position: relative;
}

[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-secondary);
    color: white;
    padding: 5px 10px;
    /* border-radius: var(--radius-sm); */
    font-size: 0.8rem;
    white-space: nowrap;
    margin-bottom: 5px;
}

[data-tooltip]:hover::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: var(--color-secondary) transparent transparent transparent;
    margin-bottom: -5px;
}

/* Status indicators */
.designer-status {
    padding: 8px 12px;
    /* border-radius: var(--radius-sm); */
    font-size: 0.85rem;
    margin-top: 10px;
}

.designer-status.success {
    background-color: rgba(46, 204, 113, 0.1);
    color: var(--color-success);
    border: 1px solid var(--color-success);
}

.designer-status.error {
    background-color: rgba(231, 76, 60, 0.1);
    color: var(--color-error);
    border: 1px solid var(--color-error);
}


#amirence-designer {
    margin: 20px 0;
    font-family: sans-serif;
}

.product-preview {
    position: relative;
    width: 300px;
    height: 400px;
    margin-bottom: 15px;
}

#product-base {
    width: 100%;
    height: auto;
}

#uploaded-logo {
    position: absolute;
    top: 120px;
    left: 100px;
    width: 100px;
    display: none;
    pointer-events: none;
}

#custom-text {
    position: absolute;
    top: 240px;
    left: 100px;
    width: 150px;
    text-align: center;
    font-size: 16px;
    color: white;
    pointer-events: none;
}