/* Character Counter Pro - Frontend Widget Styles */

.ccp-widget {
    max-width: 800px;
    margin: 20px auto;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ccp-widget-header {
    background: #2271b1;
    color: #fff;
    padding: 15px 20px;
}

.ccp-widget-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.ccp-widget-textarea {
    width: 100%;
    padding: 20px;
    border: none;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    box-sizing: border-box;
}

.ccp-widget-textarea:focus {
    outline: none;
    border-bottom-color: #2271b1;
}

.ccp-widget-stats {
    display: flex;
    justify-content: space-around;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.ccp-widget-stat {
    text-align: center;
}

.ccp-widget-stat .label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.ccp-widget-stat .value {
    display: block;
    font-size: 20px;
    font-weight: bold;
    color: #2271b1;
}

.ccp-widget-actions {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    justify-content: flex-end;
}

.ccp-widget-actions .button {
    padding: 8px 16px;
    border: 1px solid #2271b1;
    background: #fff;
    color: #2271b1;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.ccp-widget-actions .button:hover {
    background: #f0f0f1;
}

.ccp-widget-actions .button-primary {
    background: #2271b1;
    color: #fff;
}

.ccp-widget-actions .button-primary:hover {
    background: #135e96;
}

/* ダークテーマ */
.ccp-theme-dark {
    background: #1e1e1e;
    border-color: #3a3a3a;
}

.ccp-theme-dark .ccp-widget-header {
    background: #0d5c8f;
}

.ccp-theme-dark .ccp-widget-textarea {
    background: #2d2d2d;
    color: #e0e0e0;
    border-bottom-color: #3a3a3a;
}

.ccp-theme-dark .ccp-widget-stats {
    background: #2d2d2d;
    border-bottom-color: #3a3a3a;
}

.ccp-theme-dark .ccp-widget-stat .label {
    color: #aaa;
}

.ccp-theme-dark .ccp-widget-stat .value {
    color: #4a9eff;
}

.ccp-theme-dark .ccp-widget-actions .button {
    background: #2d2d2d;
    border-color: #4a9eff;
    color: #4a9eff;
}

.ccp-theme-dark .ccp-widget-actions .button:hover {
    background: #3a3a3a;
}

.ccp-theme-dark .ccp-widget-actions .button-primary {
    background: #4a9eff;
    color: #1e1e1e;
}

.ccp-theme-dark .ccp-widget-actions .button-primary:hover {
    background: #6bb3ff;
}

/* レスポンシブ */
@media (max-width: 600px) {
    .ccp-widget {
        margin: 10px;
        border-radius: 4px;
    }
    
    .ccp-widget-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .ccp-widget-stat {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .ccp-widget-stat .label,
    .ccp-widget-stat .value {
        display: inline;
    }
    
    .ccp-widget-actions {
        flex-direction: column;
    }
    
    .ccp-widget-actions .button {
        width: 100%;
    }
}
