/* Color Picker Pro Styles */

/* Main Color Picker */
.main-color-picker {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

/* Random Button */
.btn-outline-primary img.fsvg {
    filter: brightness(0) saturate(100%) invert(37%) sepia(94%) saturate(1551%) hue-rotate(195deg) brightness(91%) contrast(101%);
}

.btn-outline-primary:hover img.fsvg {
    filter: brightness(0) invert(1);
}

[data-bs-theme="dark"] .btn-outline-primary img.fsvg {
    filter: brightness(0) saturate(100%) invert(61%) sepia(53%) saturate(2878%) hue-rotate(191deg) brightness(103%) contrast(101%);
}

[data-bs-theme="dark"] .btn-outline-primary:hover img.fsvg {
    filter: brightness(0) saturate(100%) invert(20%);
}

.form-control-color {
    width: 200px;
    height: 200px;
    border: 3px solid var(--bs-border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-control-color:hover {
    border-color: #052c65;
    transform: scale(1.02);
    box-shadow: 0 4px 16px rgba(5, 44, 101, 0.2);
}

.color-preview-large {
    width: 100%;
    max-width: 300px;
    height: 100px;
    border: 2px solid var(--bs-border-color);
    border-radius: 8px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

/* Form Labels */
.form-label-sm {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    display: block;
    color: var(--bs-secondary-color);
}

/* Harmony Colors Grid */
.harmony-colors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 12px;
    min-height: 100px;
}

.harmony-color-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.harmony-color-box {
    width: 100%;
    aspect-ratio: 1;
    border: 2px solid var(--bs-border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.harmony-color-box:hover {
    transform: scale(1.05);
    border-color: #052c65;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.harmony-color-box::after {
    content: '';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.2s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M448 384H64c-35.3 0-64-28.7-64-64V192c0-35.3 28.7-64 64-64H448c35.3 0 64 28.7 64 64v128c0 35.3-28.7 64-64 64z'/%3E%3C/svg%3E");
    background-size: 14px;
    background-position: center;
    background-repeat: no-repeat;
}

.harmony-color-box:hover::after {
    opacity: 1;
}

.harmony-color-label {
    font-size: 12px;
    font-family: 'Courier New', monospace;
    color: var(--bs-secondary-color);
    text-align: center;
    word-break: break-all;
}

/* Shades & Tints */
.shades-preview {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    min-height: 60px;
}

.shade-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.shade-box {
    width: 100%;
    aspect-ratio: 1;
    border: 2px solid var(--bs-border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.shade-box:hover {
    transform: scale(1.1);
    border-color: #052c65;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.shade-label {
    font-size: 10px;
    font-family: 'Courier New', monospace;
    color: var(--bs-secondary-color);
    text-align: center;
}

/* Gradient Preview */
.gradient-preview {
    width: 100%;
    height: 120px;
    border: 2px solid var(--bs-border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

/* Saved Colors */
.saved-colors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 10px;
    min-height: 80px;
}

.empty-saved-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px;
    color: var(--bs-secondary-color);
    font-size: 14px;
    line-height: 1.6;
}

.saved-color-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
}

.saved-color-box {
    width: 100%;
    aspect-ratio: 1;
    border: 2px solid var(--bs-border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.saved-color-box:hover {
    transform: scale(1.05);
    border-color: #052c65;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.saved-color-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    background: #dc3545;
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}

.saved-color-item:hover .saved-color-remove {
    opacity: 1;
}

.saved-color-label {
    font-size: 10px;
    font-family: 'Courier New', monospace;
    color: var(--bs-secondary-color);
    text-align: center;
    word-break: break-all;
}

/* Color Info */
.info-box {
    background: var(--bs-secondary-bg);
    padding: 16px;
    border-radius: 8px;
    text-align: center;
}

.info-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--bs-secondary-color);
    margin-bottom: 8px;
}

.info-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--bs-primary-text-emphasis);
    font-family: 'Courier New', monospace;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .form-control-color {
        width: 150px;
        height: 150px;
    }

    .color-preview-large {
        height: 80px;
    }

    .harmony-colors-grid {
        grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
        gap: 8px;
    }

    .shades-preview {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .saved-colors-grid {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
        gap: 8px;
    }

    .gradient-preview {
        height: 100px;
    }

    .btn-group {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }

    .btn-group .btn {
        flex: 0 0 auto;
    }
}

/* Dark Mode */
[data-bs-theme="dark"] .form-control-color {
    border-color: #495057;
}

[data-bs-theme="dark"] .form-control-color:hover {
    border-color: #6ea8fe;
}

[data-bs-theme="dark"] .color-preview-large,
[data-bs-theme="dark"] .harmony-color-box,
[data-bs-theme="dark"] .shade-box,
[data-bs-theme="dark"] .saved-color-box,
[data-bs-theme="dark"] .gradient-preview {
    border-color: #495057;
}

[data-bs-theme="dark"] .info-box {
    background: rgba(255,255,255,0.05);
}

/* Save and Clear Buttons */
.card-header .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    padding: 6px 12px;
}

.card-header .btn img.fsvg {
    filter: brightness(0) invert(1);
}

.card-header .btn-primary img.fsvg {
    filter: brightness(0) invert(1);
}

.card-header .btn-outline-danger img.fsvg {
    filter: brightness(0) saturate(100%) invert(27%) sepia(93%) saturate(7471%) hue-rotate(3deg) brightness(93%) contrast(115%);
}

.card-header .btn-outline-danger:hover img.fsvg {
    filter: brightness(0) invert(1);
}

/* Copy Button Icons */
.btn-outline-secondary img.fsvg {
    filter: brightness(0) saturate(100%) invert(50%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(95%) contrast(90%);
}

.btn-outline-secondary:hover img.fsvg {
    filter: brightness(0) saturate(100%) invert(100%);
}

[data-bs-theme="dark"] .btn-outline-secondary img.fsvg {
    filter: brightness(0) invert(1);
}

[data-bs-theme="dark"] .btn-outline-secondary:hover img.fsvg {
    filter: brightness(0) saturate(100%) invert(20%);
}

[data-bs-theme="dark"] .card-header .btn-outline-danger img.fsvg {
    filter: brightness(0) saturate(100%) invert(42%) sepia(93%) saturate(7471%) hue-rotate(3deg) brightness(103%) contrast(115%);
}

[data-bs-theme="dark"] .card-header .btn-outline-danger:hover img.fsvg {
    filter: brightness(0) invert(1);
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.harmony-color-item,
.shade-item,
.saved-color-item {
    animation: fadeIn 0.3s ease;
}