/**
 * Froala Trial Key Generator Frontend Styles
 * 
 * @package FroalaTrialKeyGenerator
 */

/* Main Container */
.ftkg-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
}

/* Key Box */
.ftkg-key-box {
    background-color: #f9fafb;
    border-radius: 8px;
    padding: 1.5rem;
    width: 100%;
}

/* Header Section */
.ftkg-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.ftkg-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: #14b8a6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ftkg-icon svg {
    height: 20px;
    width: 20px;
}

.ftkg-title-section {
    flex-grow: 1;
}

.ftkg-title {
    font-size: 1.25rem;
    color: #1A1A1A;
    margin: 0 0 0.25rem;
    font-weight: 600;
    line-height: 1.4;
}

.ftkg-subtitle {
    font-size: 0.875rem;
    color: #666666;
    margin: 0;
    line-height: 1.5;
}

/* Key Wrapper */
.ftkg-key-wrapper {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    margin-top: 1rem;
    border: solid 2px #e5e7eb;
    border-radius: 0.5rem;
    background-color: #ffffff;
}

.ftkg-key-wrapper:hover {
    border-color: #5eead4;
}

/* Key Value */
.ftkg-key-value {
    flex-grow: 1;
    font-size: 0.9375rem;
    color: #1A1A1A;
    background: #ffffff;
    border: none;
    border-radius: 4px;
    margin: 0;
    width: 100%;
    font-size: 0.875rem;
}

.ftkg-key-value:focus {
    outline: none;
    border: none;
}

/* Copy Button */
.ftkg-copy-button {
    background: #00BFA5;
    color: #ffffff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.ftkg-copy-button:hover {
    background: #00A896;
}

.ftkg-copy-button:active {
    transform: translateY(1px);
}

.ftkg-copy-button:focus {
    outline: 2px solid #B2DFDB;
    outline-offset: 2px;
}

/* Button Text Animation */
.ftkg-button-text {
    display: inline-block;
    transition: opacity 0.2s ease-out;
}

/* Loading Animation */
.ftkg-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    text-align: center;
}

.ftkg-loading-dots {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    justify-content: center;
}

.ftkg-loading-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #14b8a6;
    animation: ftkg-loading-bounce 1.4s ease-in-out infinite both;
}

.ftkg-loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.ftkg-loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

.ftkg-loading-dots span:nth-child(3) {
    animation-delay: 0s;
}

@keyframes ftkg-loading-bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}


/* Error Messages */
.ftkg-error {
    background: #FEE2E2;
    border: 1px solid #FECACA;
    border-radius: 4px;
    padding: 1rem 1rem 0 1rem;
    margin: 1rem auto;
    color: #991B1B;
    max-width: 600px;
    text-align: center;
    font-size: 0.875rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, 5px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* Responsive Styles */
@media (max-width: 480px) {
    .ftkg-key-wrapper {
        flex-direction: column;
        gap: 1rem;
    }
    
    .ftkg-copy-button {
        width: 100%;
        justify-content: center;
    }
    
    .ftkg-header {
        gap: 0.75rem;
    }
    
    .ftkg-title {
        font-size: 1.125rem;
    }
    
    .ftkg-subtitle {
        font-size: 0.8125rem;
    }
}
