/**
* DISCLAIMER
*
* Do not edit or add to this file.
* You are not authorized to modify, copy or redistribute this file.
* Permissions are reserved by FME Modules.
*
*  @author    FMM Modules
*  @copyright FME Modules 2021
*  @license   Single domain
*/

/* Colorful Text Feature Styles */
.cpd-colorful-text-container {
    position: relative;
    display: inline-block;
    width: 100%;
}

.cpd-colorful-text {
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    display: inline-block;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
    border-radius: 5px;
    padding: 2px 4px;
}

.cpd-colorful-text .cpd-letter {
    display: inline-block;
    position: relative;
    transition: all 0.3s ease;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.3),
        -1px -1px 2px rgba(255, 255, 255, 0.3);
}

.cpd-colorful-text .cpd-letter:hover {
    transform: scale(1.1);
    text-shadow: 
        3px 3px 6px rgba(0, 0, 0, 0.4),
        -2px -2px 3px rgba(255, 255, 255, 0.4);
}

/* Colorful Text Controls */
.cpd-colorful-controls {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 15px;
    margin: 10px 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid #e0e0e0;
}

.cpd-colorful-controls h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cpd-colorful-controls h4:before {
    content: "🎨";
    font-size: 18px;
}

.cpd-color-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}

.cpd-color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
}

.cpd-color-option:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.cpd-color-option.selected {
    border-color: #333;
    transform: scale(1.15);
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #333;
}

.cpd-colorful-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.cpd-colorful-btn {
    background: linear-gradient(45deg, #FF6B6B, #4ECDC4);
    color: white;
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    font-weight: bold;
}

.cpd-colorful-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.cpd-colorful-btn:active {
    transform: translateY(0);
}

.cpd-colorful-btn.rainbow {
    background: linear-gradient(45deg, #FF6B6B, #4ECDC4, #45B7D1, #96CEB4, #FFEAA7);
    background-size: 300% 300%;
    animation: rainbowShift 3s ease infinite;
}

@keyframes rainbowShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.cpd-colorful-btn.reset {
    background: linear-gradient(45deg, #96CEB4, #FFEAA7);
    color: #333;
}

.cpd-colorful-btn.decorations {
    background: linear-gradient(45deg, #DDA0DD, #98D8C8);
}

/* Font Style Controls for Colorful Text */
.cpd-colorful-font-controls {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.cpd-font-style-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
    margin: 10px 0;
}

.cpd-font-style-btn {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 12px;
    font-weight: bold;
}

.cpd-font-style-btn:hover {
    background: #e9ecef;
    border-color: #4ECDC4;
}

.cpd-font-style-btn.active {
    background: #4ECDC4;
    color: white;
    border-color: #4ECDC4;
}

.cpd-font-style-btn.bold {
    font-weight: bold;
}

.cpd-font-style-btn.italic {
    font-style: italic;
}

.cpd-font-style-btn.underline {
    text-decoration: underline;
}

/* Animation Effects */
.cpd-letter-bounce {
    animation: letterBounce 0.6s ease;
}

@keyframes letterBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.cpd-letter-glow {
    animation: letterGlow 2s ease-in-out infinite alternate;
}

@keyframes letterGlow {
    from {
        text-shadow: 
            2px 2px 4px rgba(0, 0, 0, 0.3),
            -1px -1px 2px rgba(255, 255, 255, 0.3);
    }
    to {
        text-shadow: 
            2px 2px 4px rgba(0, 0, 0, 0.3),
            -1px -1px 2px rgba(255, 255, 255, 0.3),
            0 0 20px currentColor;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .cpd-colorful-controls {
        padding: 10px;
    }
    
    .cpd-color-option {
        width: 25px;
        height: 25px;
    }
    
    .cpd-colorful-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .cpd-font-style-grid {
        grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
        gap: 5px;
    }
}

/* Integration with existing CPD styles */
.cpd_toolset .cpd-colorful-controls {
    margin: 0;
    border: none;
    box-shadow: none;
    background: transparent;
}

.cpd_toolset .cpd-colorful-controls h4 {
    font-size: 14px;
    margin-bottom: 10px;
}

/* Preview Mode */
.cpd-colorful-preview {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    border-radius: 10px;
    margin: 15px 0;
    text-align: center;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cpd-colorful-preview .cpd-colorful-text {
    font-size: 24px;
    background: none;
    padding: 0;
}

/* Status indicator */
.cpd-colorful-status {
    font-size: 12px;
    color: #666;
    margin-top: 10px;
    text-align: center;
    font-style: italic;
}

.cpd-colorful-status.active {
    color: #4ECDC4;
    font-weight: bold;
}
