/* Firefly Flasher WordPress Plugin Styles */

.firefly-flasher-container {
    font-family: Inter, Sans-Serif;
    margin: 20px 0;
}

.firefly-flasher-container h1 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

#flashTool {
    font-family: Inter, Sans-Serif;
    width: 400px;
    border: 1px solid #888;
    padding: 10px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#flashTool select {
    padding: 12px;
    margin: 10px 0;
    box-sizing: border-box;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    width: 100%;
}

#flashTool button {
    width: 100%;
    color: white;
    background-color: #9473eb;
    border: none;
    border-radius: 8px;
    padding: 16px 32px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;

    /* For spinner */
    position: relative;
    transition: padding-right .3s ease-out;
}

#flashTool button:hover:not(:disabled) {
    background-color: #7c5ce8;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(148, 115, 235, 0.3);
}

#flashTool button:disabled,
#flashTool button[disabled]{
    border: 1px solid #999999;
    background-color: #cccccc;
    color: #666666;
    cursor: default;
    transform: none;
    box-shadow: none;
}

#flashTool button.loading:after {
    content: "";
    position: absolute;
    border-radius: 100%;
    right: 15px;
    top: 50%;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    border: 4px solid rgba(255,255,255,0.5);
    border-left-color: #FFF;
    border-top-color: #FFF;
    animation: spin .6s infinite linear;
}

@keyframes spin { 
    to {
        transform: rotate(359deg);
    }
}

#flashTool button.success {
    background-color: #28a745;
}

#flashTool button.success:hover {
    background-color: #218838;
}

#flashTool .formElementWrap {
    display: flex;
    align-items: center;
    margin: 15px 0;
}

#flashTool .formElementWrap label {
    margin: 5px;
    font-weight: 500;
    color: #333;
    min-width: 150px;
}

#flashTool .formElementWrap select {
    flex-grow: 1;
}

#flashTool p {
    margin: 15px 0;
    line-height: 1.5;
    color: #666;
    font-size: 14px;
}

#flashTool hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 20px 0;
}

#flashTool #connectMessage,
#flashTool #flashingMessage {
    margin: 10px 0;
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
}

#flashTool #connectMessage:empty,
#flashTool #flashingMessage:empty {
    display: none;
}

#flashTool #connectMessage {
    background: #f8f9fa;
    border-left: 4px solid #007cba;
}

#flashTool #flashingMessage {
    background: #f8f9fa;
    border-left: 4px solid #28a745;
}

#flashTool #unsupportedBrowserErr p,
#flashTool noscript p {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
}

/* Changelog Section */
.firefly-changelog {
    margin-top: 15px;
    width: 400px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 10px 15px;
    background: #fafafa;
}

.firefly-changelog h3 {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid #e2e8f0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.firefly-changelog .changelog-content h4 {
    font-size: 11px;
    font-weight: 600;
    color: #9473eb;
    margin: 12px 0 4px 0;
}

.firefly-changelog .changelog-content h4:first-child {
    margin-top: 0;
}

.firefly-changelog .changelog-content ul {
    margin: 0 0 8px 0;
    padding-left: 16px;
    list-style-type: disc;
}

.firefly-changelog .changelog-content ul:last-child {
    margin-bottom: 0;
}

.firefly-changelog .changelog-content li {
    font-size: 11px;
    color: #555;
    line-height: 1.4;
    margin-bottom: 2px;
}

.firefly-changelog .changelog-content li:last-child {
    margin-bottom: 0;
}

.firefly-changelog .changelog-content p {
    font-size: 11px;
    color: #555;
    line-height: 1.4;
    margin: 0 0 8px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .firefly-flasher-container {
        margin: 10px 0;
    }
    
    #flashTool {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .firefly-flasher-container h1 {
        font-size: 20px;
        text-align: center;
    }
    
    #flashTool .formElementWrap {
        flex-direction: column;
        align-items: flex-start;
    }
    
    #flashTool .formElementWrap label {
        margin-bottom: 5px;
        min-width: auto;
    }
    
    .firefly-changelog {
        width: 100%;
        max-width: 400px;
        margin: 20px auto 0;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .firefly-flasher-container h1 {
        color: #fff;
    }
    
    #flashTool {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    #flashTool select {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    #flashTool .formElementWrap label {
        color: #e2e8f0;
    }
    
    #flashTool p {
        color: #cbd5e0;
    }
    
    #flashTool hr {
        border-color: #4a5568;
    }
    
    #flashTool #connectMessage,
    #flashTool #flashingMessage {
        background: #4a5568;
        color: #e2e8f0;
    }
    
    .firefly-changelog {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .firefly-changelog h3 {
        color: #e2e8f0;
        border-color: #4a5568;
    }
    
    .firefly-changelog .changelog-content h4 {
        color: #a78bfa;
    }
    
    .firefly-changelog .changelog-content li,
    .firefly-changelog .changelog-content p {
        color: #cbd5e0;
    }
}
